Patch from Scott Bertilson <ssb@umn.edu> to remove dependence on s6_addr32.

This commit is contained in:
pdw
2011-10-03 20:21:55 +00:00
parent cd57e76727
commit fc511cfea9
4 changed files with 18 additions and 17 deletions

View File

@@ -43,7 +43,7 @@ int hash(void* key) {
addr_pair* ap = (addr_pair*)key;
if (ap->af == AF_INET6) {
uint32_t* addr6 = ap->src6.s6_addr32;
uint32_t* addr6 = (uint32_t*)ap->src6.s6_addr;
hash = ( hash_uint32(addr6[0])
+ hash_uint32(addr6[1])
@@ -51,7 +51,7 @@ int hash(void* key) {
+ hash_uint32(addr6[3])
+ ap->src_port) % 0xFF;
addr6 = ap->dst6.s6_addr32;
addr6 = (uint32_t*)ap->dst6.s6_addr;
hash = ( hash + hash_uint32(addr6[0])
+ hash_uint32(addr6[1])
+ hash_uint32(addr6[2])