]> git.baikalelectronics.ru Git - kernel.git/commit
net: flow_dissector: Wrap unionized VLAN fields in a struct
authorPetr Machata <petrm@mellanox.com>
Fri, 22 Nov 2019 15:47:21 +0000 (15:47 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 22 Nov 2019 17:44:14 +0000 (09:44 -0800)
commit273008aaac96be760981da151cb18dc9be799c02
tree0e059462312ad4d8050a3489fcccd513cf986743
parent9869e3a7989497fa3ed4982f81808c268337fe5d
net: flow_dissector: Wrap unionized VLAN fields in a struct

In commit 76d1f27effd4 ("netfilter: nft_payload: add VLAN offload
support"), VLAN fields in struct flow_dissector_key_vlan were unionized
with the intention of introducing another field that covered the whole TCI
header. However without a wrapping struct the subfields end up sharing the
same bits. As a result, "tc filter add ... flower vlan_id 14" specifies not
only vlan_id, but also vlan_priority.

Fix by wrapping the individual VLAN fields in a struct.

Fixes: 76d1f27effd4 ("netfilter: nft_payload: add VLAN offload support")
Signed-off-by: Petr Machata <petrm@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/flow_dissector.h