In flow_dissector set vlan_id in flow_keys when VLAN is found.
Signed-off-by: Tom Herbert <[email protected]>
---
include/net/flow_keys.h | 1 +
net/core/flow_dissector.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/include/net/flow_keys.h b/include/net/flow_keys.h
index c8bc6aa..14298e2 100644
--- a/include/net/flow_keys.h
+++ b/include/net/flow_keys.h
@@ -26,6 +26,7 @@ struct flow_keys {
__be16 n_proto;
u8 ip_proto;
u8 padding;
+ u32 vlan_id:12;
union {
__be32 ports;
diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
index 69fbaf9..148b989 100644
--- a/net/core/flow_dissector.c
+++ b/net/core/flow_dissector.c
@@ -143,6 +143,7 @@ ipv6:
if (!vlan)
return false;
+ flow->vlan_id = skb_vlan_tag_get_id(skb);
proto = vlan->h_vlan_encapsulated_proto;
nhoff += sizeof(*vlan);
goto again;
--
1.8.1
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html