diff options
author | mlaier <mlaier@FreeBSD.org> | 2006-05-14 23:42:24 +0000 |
---|---|---|
committer | mlaier <mlaier@FreeBSD.org> | 2006-05-14 23:42:24 +0000 |
commit | d94d020eed28972393d0bb8f5a3a0858d7e01c10 (patch) | |
tree | dd971341eb6220ebb9f4788de3f07977582b5b7f /sys | |
parent | c1402da0d8b4075859866b345a6d8ab94b9dde29 (diff) | |
download | FreeBSD-src-d94d020eed28972393d0bb8f5a3a0858d7e01c10.zip FreeBSD-src-d94d020eed28972393d0bb8f5a3a0858d7e01c10.tar.gz |
Use only lower 64bit of src/dest (and src/dest port) for hashing of IPv6
connections and get rid of the flow_id as it is not guaranteed to be stable
some (most?) current implementations seem to just zero it out.
PR: kern/88664
Reported by: jylefort
Submitted by: Joost Bekkers (w/ changes)
Tested by "regisr" <regisrApoboxDcom>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/ip_fw2.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet/ip_fw2.c b/sys/netinet/ip_fw2.c index 980d52f..559d5cd 100644 --- a/sys/netinet/ip_fw2.c +++ b/sys/netinet/ip_fw2.c @@ -641,11 +641,11 @@ static __inline int hash_packet6(struct ipfw_flow_id *id) { u_int32_t i; - i = (id->dst_ip6.__u6_addr.__u6_addr32[0]) ^ - (id->dst_ip6.__u6_addr.__u6_addr32[1]) ^ - (id->dst_ip6.__u6_addr.__u6_addr32[2]) ^ + i = (id->dst_ip6.__u6_addr.__u6_addr32[2]) ^ (id->dst_ip6.__u6_addr.__u6_addr32[3]) ^ - (id->dst_port) ^ (id->src_port) ^ (id->flow_id6); + (id->src_ip6.__u6_addr.__u6_addr32[2]) ^ + (id->src_ip6.__u6_addr.__u6_addr32[3]) ^ + (id->dst_port) ^ (id->src_port); return i; } |