aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r--drivers/net/bonding/bond_main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 07f257d44a1e..e48cb339c0c6 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -3714,11 +3714,17 @@ static int bond_neigh_init(struct neighbour *n)
3714 * The bonding ndo_neigh_setup is called at init time beofre any 3714 * The bonding ndo_neigh_setup is called at init time beofre any
3715 * slave exists. So we must declare proxy setup function which will 3715 * slave exists. So we must declare proxy setup function which will
3716 * be used at run time to resolve the actual slave neigh param setup. 3716 * be used at run time to resolve the actual slave neigh param setup.
3717 *
3718 * It's also called by master devices (such as vlans) to setup their
3719 * underlying devices. In that case - do nothing, we're already set up from
3720 * our init.
3717 */ 3721 */
3718static int bond_neigh_setup(struct net_device *dev, 3722static int bond_neigh_setup(struct net_device *dev,
3719 struct neigh_parms *parms) 3723 struct neigh_parms *parms)
3720{ 3724{
3721 parms->neigh_setup = bond_neigh_init; 3725 /* modify only our neigh_parms */
3726 if (parms->dev == dev)
3727 parms->neigh_setup = bond_neigh_init;
3722 3728
3723 return 0; 3729 return 0;
3724} 3730}