diff options
author | Jianbo Liu <jianbol@mellanox.com> | 2018-07-06 08:38:12 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-07 14:51:53 +0300 |
commit | 2064c3d4c02026572d4975177f28a58052f0a8b7 (patch) | |
tree | 7b7f23e9d67d4b44a707ce2542a7f11d98700a5f /net/core/flow_dissector.c | |
parent | 94c763513452b466d1e5c86b9d883ba13c9a031a (diff) | |
download | linux-2064c3d4c02026572d4975177f28a58052f0a8b7.tar.xz |
net/flow_dissector: Save vlan ethertype from headers
Change vlan dissector key to save vlan tpid to support both 802.1Q
and 802.1AD ethertype.
Signed-off-by: Jianbo Liu <jianbol@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/flow_dissector.c')
-rw-r--r-- | net/core/flow_dissector.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c index 53f96e4f7bf5..18cb99b50cba 100644 --- a/net/core/flow_dissector.c +++ b/net/core/flow_dissector.c @@ -751,6 +751,7 @@ proto_again: const struct vlan_hdr *vlan; struct vlan_hdr _vlan; bool vlan_tag_present = skb && skb_vlan_tag_present(skb); + __be16 saved_vlan_tpid = proto; if (vlan_tag_present) proto = skb->protocol; @@ -789,6 +790,7 @@ proto_again: (ntohs(vlan->h_vlan_TCI) & VLAN_PRIO_MASK) >> VLAN_PRIO_SHIFT; } + key_vlan->vlan_tpid = saved_vlan_tpid; } fdret = FLOW_DISSECT_RET_PROTO_AGAIN; |