[tor/maint-0.4.5] Merge branch 'maint-0.3.5' into maint-0.4.4

commit 31eaa81f59749ed7e9d4f1bad24225d23eb6f654 Merge: 7c19a4d924 d71bf986b4 Author: Nick Mathewson <nickm@torproject.org> Date: Thu Jun 10 08:42:15 2021 -0400 Merge branch 'maint-0.3.5' into maint-0.4.4 changes/bug40391 | 9 +++++++++ src/core/or/circuitmux.c | 7 ++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --cc src/core/or/circuitmux.c index b770e40bf2,e7309553c4..be54ae6ec6 --- a/src/core/or/circuitmux.c +++ b/src/core/or/circuitmux.c @@@ -169,17 -216,21 +169,18 @@@ chanid_circid_entries_eq(chanid_circid_ 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 */ -HT_HEAD(chanid_circid_muxinfo_map, chanid_circid_muxinfo_t); - /* Emit a bunch of hash table stuff */ HT_PROTOTYPE(chanid_circid_muxinfo_map, chanid_circid_muxinfo_t, node, - chanid_circid_entry_hash, chanid_circid_entries_eq) + chanid_circid_entry_hash, chanid_circid_entries_eq); HT_GENERATE2(chanid_circid_muxinfo_map, chanid_circid_muxinfo_t, node, chanid_circid_entry_hash, chanid_circid_entries_eq, 0.6, - tor_reallocarray_, tor_free_) + tor_reallocarray_, tor_free_); /* * Circuitmux alloc/free functions
participants (1)
-
nickm@torproject.org