]> 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)
commit71cea3060b487d73721af93008bacbfc5be8dedc
treeed9ac3f950aca975ce8fc23c8b8fa047d41d05c6
parent2e180eb2ecafab391a16c06d046e6c8ea946dd1e
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: 0c2bb571c6f2 ("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