From 7a04b0f625e7f396ded0e1ca2365e5be5eb89186 Mon Sep 17 00:00:00 2001 From: Andrew Thompson Date: Tue, 15 May 2007 07:59:49 +0000 Subject: [PATCH] Feed ipv6 flowlabel to hash calculation. Obtained from: NetBSD --- sys/net/if_lagg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c index 2ab11857dd18..c95115347155 100644 --- a/sys/net/if_lagg.c +++ b/sys/net/if_lagg.c @@ -1199,7 +1199,7 @@ uint32_t lagg_hashmbuf(struct mbuf *m, uint32_t key) { uint16_t etype; - uint32_t p = 0; + uint32_t flow, p = 0; int off; struct ether_header *eh; struct ether_vlan_header vlanbuf; @@ -1254,6 +1254,8 @@ lagg_hashmbuf(struct mbuf *m, uint32_t key) 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 }