]> git.baikalelectronics.ru Git - kernel.git/commit
switchdev: check if the vlan id is in the proper vlan range
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Mon, 12 Oct 2015 12:31:01 +0000 (14:31 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Oct 2015 11:43:24 +0000 (04:43 -0700)
commit0fef8766e479e0d57998680010cd9869801c7fa2
treeed9ac3f950aca975ce8fc23c8b8fa047d41d05c6
parentd6199473a0025460108c41e0062246544df54bd4
switchdev: check if the vlan id is in the proper vlan range

VLANs 0 and 4095 are reserved and shouldn't be used, add checks to
switchdev similar to the bridge. Also make sure ids above 4095 cannot
be passed either.

Fixes: 55858308ccc7 ("switchdev: add new switchdev bridge setlink")
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Acked-by: Scott Feldman <sfeldma@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/switchdev/switchdev.c