]> git.baikalelectronics.ru Git - kernel.git/commit
net: vrf: do not allow table id 0
authorDavid Ahern <dsa@cumulusnetworks.com>
Tue, 10 Jan 2017 23:22:25 +0000 (15:22 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Jan 2017 15:04:01 +0000 (10:04 -0500)
commit24e3eabdd1c42250d658fe88fc76cbe28698121b
tree7706deaa26f79bb4c4878399cb93448613bba7b2
parent322f1a117e1ad2c61a02d41ea28e380835cfba47
net: vrf: do not allow table id 0

Frank reported that vrf devices can be created with a table id of 0.
This breaks many of the run time table id checks and should not be
allowed. Detect this condition at create time and fail with EINVAL.

Fixes: 9c5f942f99b3 ("net: Introduce VRF device driver")
Reported-by: Frank Kellermann <frank.kellermann@atos.net>
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vrf.c