]> 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)
commitc14f25b64740213cdcf093cedd31437ea55e64f4
tree42c512bb85da73be4c3634c49e1a6bcbb42eb1b4
parent61c796a82e74bdfda1f369fca3667a092c10d329
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