aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/circuitmux.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2021-06-10 08:42:15 -0400
committerNick Mathewson <nickm@torproject.org>2021-06-10 08:42:15 -0400
commit15617f29cb8a067ac399557cc6e72e0a415946da (patch)
tree6b9cc10d213c759fad51afbb914fc001dcd328e3 /src/core/or/circuitmux.c
parentaa4da024ad5aac5630ca957bcc9b521185d12f3f (diff)
parent31eaa81f59749ed7e9d4f1bad24225d23eb6f654 (diff)
downloadtor-15617f29cb8a067ac399557cc6e72e0a415946da.tar.gz
tor-15617f29cb8a067ac399557cc6e72e0a415946da.zip
Merge branch 'maint-0.4.4' into release-0.4.4
Diffstat (limited to 'src/core/or/circuitmux.c')
-rw-r--r--src/core/or/circuitmux.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/or/circuitmux.c b/src/core/or/circuitmux.c
index b770e40bf2..be54ae6ec6 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 */