]> git.baikalelectronics.ru Git - kernel.git/commit
flow_dissector: For stripped vlan, get vlan info from skb->vlan_tci
authorHadar Hen Zion <hadarh@mellanox.com>
Wed, 17 Aug 2016 10:36:10 +0000 (13:36 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Aug 2016 06:13:13 +0000 (23:13 -0700)
commit008f894c6e97d0c04bd1798735d1ebbb64cfee92
tree0c81a4b8ffcf8995ac047b89b760f1b6b9ed6901
parent50916e90a905942c867b57b0e382d2c96dfc29d3
flow_dissector: For stripped vlan, get vlan info from skb->vlan_tci

Early in the datapath skb_vlan_untag function is called, stripped
the vlan from the skb and set skb->vlan_tci and skb->vlan_proto fields.

The current dissection doesn't handle stripped vlan packets correctly.
In some flows, vlan doesn't exist in skb->data anymore when applying
flow dissection on the skb, fix that.

In case vlan info wasn't stripped before applying flow_dissector (RPS
flow for example), or in case of skb with multiple vlans (e.g. 802.1ad),
get the vlan info from skb->data. The flow_dissector correctly skips
any number of vlans and stores only the first level vlan.

Fixes: 298cfe079335 ('net: introduce skb_flow_dissect()')
Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/flow_dissector.c