提交 cc02aa8e 编写于 作者: N Nikolay Aleksandrov 提交者: 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: NNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Acked-by: NElad Raz <eladr@mellanox.com>
Acked-by: NJiri Pirko <jiri@mellanox.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册