diff options
author | Nick Mathewson <nickm@torproject.org> | 2021-06-10 08:41:59 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2021-06-10 08:41:59 -0400 |
commit | d71bf986b4faf7cb3b654192bc67d5b674cfcf02 (patch) | |
tree | a8561ec2c8d14fff48bde16a1b90acffe5c83f59 /src | |
parent | 7fdfc2ea5470c572a113321e19cdb5144b10cdd8 (diff) | |
parent | 4c06c619faceb5d158a725d97fda45cadb2cf9c9 (diff) | |
download | tor-d71bf986b4faf7cb3b654192bc67d5b674cfcf02.tar.gz tor-d71bf986b4faf7cb3b654192bc67d5b674cfcf02.zip |
Merge branch 'bug40391_035' into maint-0.3.5
Diffstat (limited to 'src')
-rw-r--r-- | src/core/or/circuitmux.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/or/circuitmux.c b/src/core/or/circuitmux.c index 88f9ac7923..e7309553c4 100644 --- a/src/core/or/circuitmux.c +++ b/src/core/or/circuitmux.c @@ -216,9 +216,10 @@ chanid_circid_entries_eq(chanid_circid_muxinfo_t *a, static inline unsigned int chanid_circid_entry_hash(chanid_circid_muxinfo_t *a) { - return (((unsigned int)(a->circ_id) << 8) ^ - ((unsigned int)((a->chan_id >> 32) & 0xffffffff)) ^ - ((unsigned int)(a->chan_id & 0xffffffff))); + uint8_t data[8 + 4]; + set_uint64(data, a->chan_id); + set_uint32(data + 8, a->circ_id); + return (unsigned) siphash24g(data, sizeof(data)); } /* Declare the struct chanid_circid_muxinfo_map type */ @@ -1361,4 +1362,3 @@ circuitmux_compare_muxes, (circuitmux_t *cmux_1, circuitmux_t *cmux_2)) return 0; } } - |