net: vrf: Make add_fib_rules per network namespace flag
authorDavid Ahern <dsahern@gmail.com>
Thu, 8 Jun 2017 17:31:11 +0000 (11:31 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Jul 2017 12:41:35 +0000 (14:41 +0200)
commit83cb92f4cf116e059d83c6e103c7fd9acbac76d9
tree92a90d2973d44ef6c8118609c9c58dde74fe6763
parent5586883813df1a46a99d79b8ab69963b9f3401ba
net: vrf: Make add_fib_rules per network namespace flag

[ Upstream commit 097d3c9508dc58286344e4a22b300098cf0c1566 ]

Commit 1aa6c4f6b8cd8 ("net: vrf: Add l3mdev rules on first device create")
adds the l3mdev FIB rule the first time a VRF device is created. However,
it only creates the rule once and only in the namespace the first device
is created - which may not be init_net. Fix by using the net_generic
capability to make the add_fib_rules flag per network namespace.

Fixes: 1aa6c4f6b8cd8 ("net: vrf: Add l3mdev rules on first device create")
Reported-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/vrf.c