summaryrefslogtreecommitdiff
path: root/sys/net/if_trunk.c
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2008-10-28 07:11:04 +0000
committerBrad Smith <brad@cvs.openbsd.org>2008-10-28 07:11:04 +0000
commit02510dbea9f336b7b3d0094deb100a7faef18229 (patch)
tree74591b3cbd12af00f576e160970ab32d37edddb8 /sys/net/if_trunk.c
parentdf8cbcea9a3712e98e5800b607200f7c2aa744fc (diff)
Feed IPv6 flow label to hash calculation.
From FreeBSD Ok mpf@
Diffstat (limited to 'sys/net/if_trunk.c')
-rw-r--r--sys/net/if_trunk.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/net/if_trunk.c b/sys/net/if_trunk.c
index b5fa059ea1d..28527f52430 100644
--- a/sys/net/if_trunk.c
+++ b/sys/net/if_trunk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_trunk.c,v 1.52 2008/10/28 07:10:09 brad Exp $ */
+/* $OpenBSD: if_trunk.c,v 1.53 2008/10/28 07:11:03 brad Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Reyk Floeter <reyk@openbsd.org>
@@ -985,7 +985,7 @@ u_int32_t
trunk_hashmbuf(struct mbuf *m, u_int32_t key)
{
u_int16_t etype;
- u_int32_t p = 0;
+ u_int32_t flow, p = 0;
u_int16_t *vlan, vlanbuf[2];
int off;
struct ether_header *eh;
@@ -1031,6 +1031,8 @@ trunk_hashmbuf(struct mbuf *m, u_int32_t key)
return (p);
p = hash32_buf(&ip6->ip6_src, sizeof(struct in6_addr), p);
p = hash32_buf(&ip6->ip6_dst, sizeof(struct in6_addr), p);
+ flow = ip6->ip6_flow & IPV6_FLOWLABEL_MASK;
+ p = hash32_buf(&flow, sizeof(flow), p); /* IPv6 flow label */
break;
#endif
}