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)
commitfdeea7be88b12742bfd50d9e19a06c0d2e702400
tree42c512bb85da73be4c3634c49e1a6bcbb42eb1b4
parent5d7bfd141924a5ece21eb612ad3c56612f041c1e
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