]> git.baikalelectronics.ru Git - kernel.git/commit
bridge: vlan: fix usage of vlan 0 and 4095 again
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Thu, 2 Jul 2015 12:48:17 +0000 (05:48 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 2 Jul 2015 19:19:17 +0000 (12:19 -0700)
commitb65d975df1a6b1ad414aa5b415602066ea67b494
tree7b09da8f3051c6c94f0acf2a7b992b8a62a723f9
parentdb8196fe162981ef3d134a42fd6cf0340198d281
bridge: vlan: fix usage of vlan 0 and 4095 again

Vlan ids 0 and 4095 were disallowed by commit:
1945addea6d8 ("bridge: Don't use VID 0 and 4095 in vlan filtering")
but then the check was removed when vlan ranges were introduced by:
57540eed2da2 ("bridge: support for multiple vlans and vlan ranges in setlink and dellink requests")
So reintroduce the vlan range check.
Before patch:
[root@testvm ~]# bridge vlan add vid 0 dev eth0 master
(succeeds)
After Patch:
[root@testvm ~]# bridge vlan add vid 0 dev eth0 master
RTNETLINK answers: Invalid argument

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Fixes: 57540eed2da2 ("bridge: support for multiple vlans and vlan ranges in setlink and dellink requests")
Acked-by: Toshiaki Makita <toshiaki.makita1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_netlink.c