Skip to content

Commit

Permalink
IP: improve hashing for IP addresses.
Browse files Browse the repository at this point in the history
  • Loading branch information
SolidWallOfCode committed Oct 20, 2023
1 parent 61055cb commit 85e7761
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/include/swoc/IPAddr.h
Original file line number Diff line number Diff line change
Expand Up @@ -1450,7 +1450,7 @@ template <> struct hash<swoc::IP4Addr> {
/// Standard hash support for @a IP6Addr.
template <> struct hash<swoc::IP6Addr> {
size_t operator()(swoc::IP6Addr const &addr) const {
// XOR the 64 chunks then XOR that down to 32 bits.
// XOR the 64 chunks
auto words = addr.as_span<uint64_t>();
return words[0] ^ words[1];
}
Expand Down

0 comments on commit 85e7761

Please sign in to comment.