diff options
author | Nick Mathewson <nickm@torproject.org> | 2021-06-10 08:42:15 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2021-06-10 08:42:15 -0400 |
commit | 69bd4a8a2db6645b69a902d5ef6eb8c832f122fc (patch) | |
tree | 784054f4c4953956ac785d50bee8f354acfd93a0 /src/core | |
parent | 1d11675adbc40c52b0d5047c0bb6f033bde6b19a (diff) | |
parent | 1da8621c0aef1f3fa694802b2bbea888a8d82d99 (diff) | |
download | tor-69bd4a8a2db6645b69a902d5ef6eb8c832f122fc.tar.gz tor-69bd4a8a2db6645b69a902d5ef6eb8c832f122fc.zip |
Merge branch 'maint-0.4.5' into maint-0.4.6
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/or/circuitmux.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/or/circuitmux.c b/src/core/or/circuitmux.c index 4860c6ed52..6f8761ca39 100644 --- a/src/core/or/circuitmux.c +++ b/src/core/or/circuitmux.c @@ -169,9 +169,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)); } /* Emit a bunch of hash table stuff */ |