# \[PATCH net-next 4/6\] flow\_dissector: Include VLAN ID in hash computation

- From: Tom Herbert \<hidden\>
- Date: 2015-02-28 03:12:57 
- List: netdev
- Page: https://ratatoskr.run/netdev/2015/02/10979350
- Thread: https://ratatoskr.run/netdev/2015/02/10979346/t.md

```text
If VLAN is present include that in hash_extra in flow_keys when
dissecting. This will then be included in hash computation.

Signed-off-by: Tom Herbert <redacted>
---
 net/core/flow_dissector.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
index 84bb794..b11eec1 100644
--- a/net/core/flow_dissector.c
+++ b/net/core/flow_dissector.c
@@ -155,6 +155,7 @@ ipv6:
 		if (!vlan)
 			return false;
 
+		flow->hash_extra ^= vlan->h_vlan_TCI;
 		proto = vlan->h_vlan_encapsulated_proto;
 		nhoff += sizeof(*vlan);
 		goto again;
-- 
2.2.0.rc0.207.ga3a616c
```
