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)
commit87aaf2caed8496404d3809edc30d38d4a4a5d273
treeed9ac3f950aca975ce8fc23c8b8fa047d41d05c6
parent1f225031fee6c39cbbf2a6c79cb150ff63f0556c
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: 47f8328bb1a4 ("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