]> git.baikalelectronics.ru Git - kernel.git/commit
net: vrf: Set slave's private flag before linking
authorIdo Schimmel <idosch@mellanox.com>
Thu, 16 Mar 2017 08:08:15 +0000 (09:08 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 16 Mar 2017 17:18:34 +0000 (10:18 -0700)
commit615024721624901f888c37c06f9873799a328310
tree42c512bb85da73be4c3634c49e1a6bcbb42eb1b4
parent5e75eb6dc2516c229465f5cc87960a2a102b8bf7
net: vrf: Set slave's private flag before linking

Allow listeners of the subsequent CHANGEUPPER notification to retrieve
the VRF's table ID by calling l3mdev_fib_table() with the slave netdev.
Without this change, the netdev won't be considered an L3 slave and the
function would return 0.

This is consistent with other master device such as bridge and bond that
set the slave's private flag before linking. It also makes
do_vrf_{add,del}_slave() symmetric.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Acked-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vrf.c