mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-29 05:12:59 +01:00
bridge: vlan: enforce no pvid flag in vlan ranges
Currently it's possible for someone to send a vlan range to the kernel with the pvid flag set which will result in the pvid bouncing from a vlan to vlan and isn't correct, it also introduces problems for hardware where it doesn't make sense having more than 1 pvid. iproute2 already enforces this, so let's enforce it on kernel-side as well. Reported-by: Elad Raz <[email protected]> Signed-off-by: Nikolay Aleksandrov <[email protected]> Acked-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
1 parent
cbb41b91e6
commit
6623c60dc2
1 file changed
+3
@@ -524,6 +524,9 @@ static int br_afspec(struct net_bridge *br,
|
||||
if (vinfo_start)
|
||||
return -EINVAL;
|
||||
vinfo_start = vinfo;
|
||||
/* don't allow range of pvids */
|
||||
if (vinfo_start->flags & BRIDGE_VLAN_INFO_PVID)
|
||||
return -EINVAL;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user