aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMax Laier <mlaier@FreeBSD.org>2006-05-14 23:42:24 +0000
committerMax Laier <mlaier@FreeBSD.org>2006-05-14 23:42:24 +0000
commit0e7185f6e74109432491bb895ab78ceee9cfaa2a (patch)
treedd971341eb6220ebb9f4788de3f07977582b5b7f /sys
parent0c3420df685d97590dbda381d1f758bf7087258a (diff)
downloadsrc-0e7185f6e74109432491bb895ab78ceee9cfaa2a.tar.gz
src-0e7185f6e74109432491bb895ab78ceee9cfaa2a.zip
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>
Notes
Notes: svn path=/head/; revision=158580
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/ip_fw2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet/ip_fw2.c b/sys/netinet/ip_fw2.c
index 980d52fcfecf..559d5cd112c6 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;
}