OSDN Git Service

net/mlx5e: Deny VLAN rewrite if there is no VLAN header match
authorEli Britstein <elibr@mellanox.com>
Thu, 14 Mar 2019 14:41:40 +0000 (14:41 +0000)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 5 Apr 2019 21:10:34 +0000 (14:10 -0700)
commitbf2f3bca1c5dee845e436d8af96ca3811f2aa2f9
treef88880a8cb140bd4b508b275a419f2b84c5abcd9
parent8377629e76bcdf5ba1d3f2d220eebbfd947cfe7a
net/mlx5e: Deny VLAN rewrite if there is no VLAN header match

Rewrite of the packet in the VLAN offset may corrupt the packet if it's
not VLAN tagged. Deny the rewrite in this case.

Fixes: 37410902874c ("net/mlx5e: Support VLAN modify action")
Signed-off-by: Eli Britstein <elibr@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c