net/mlx5: refuse empty VLAN in flow pattern
authorShiri Kuzin <shirik@nvidia.com>
Tue, 19 Jan 2021 17:07:00 +0000 (19:07 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 29 Jan 2021 17:16:08 +0000 (18:16 +0100)
commitb6aaaa22aeb66cda787d0e0280742da3d735def3
tree2c607c7104355e5e39bf9336376a5e5ae6217387
parentbd0940a5c4df6a79595adac39959ab8b578ec3a9
net/mlx5: refuse empty VLAN in flow pattern

In verbs, an empty VLAN is equivalent to a packet without VLAN layer,
hence, the VLAN item should not be empty and this case is rejected.

However, the case for ether type of VLAN without following VLAN item
was not validated, allowing the creation of a flow with empty
VLAN item.

To fix this issue a validation was added requiring ether type of VLAN
will be followed with VLAN item.

Fixes: 0b1edd21cd78 ("net/mlx5: refuse empty VLAN flow specification")
Cc: stable@dpdk.org
Signed-off-by: Shiri Kuzin <shirik@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/mlx5_flow_verbs.c