Commit cc02aa8e authored by Nikolay Aleksandrov's avatar Nikolay Aleksandrov Committed by David S. Miller

switchdev: enforce no pvid flag in vlan ranges

We shouldn't allow BRIDGE_VLAN_INFO_PVID flag in VLAN ranges.
Signed-off-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Acked-by: default avatarElad Raz <eladr@mellanox.com>
Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f83665d0
......@@ -727,6 +727,9 @@ static int switchdev_port_br_afspec(struct net_device *dev,
if (vlan.vid_begin)
return -EINVAL;
vlan.vid_begin = vinfo->vid;
/* don't allow range of pvids */
if (vlan.flags & BRIDGE_VLAN_INFO_PVID)
return -EINVAL;
} else if (vinfo->flags & BRIDGE_VLAN_INFO_RANGE_END) {
if (!vlan.vid_begin)
return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment