Commit 71244e7b authored by Veaceslav Falico's avatar Veaceslav Falico Committed by Greg Kroah-Hartman

bonding: modify only neigh_parms owned by us

[ Upstream commit 9918d5bf ]

Otherwise, on neighbour creation, bond_neigh_init() will be called with a
foreign netdev.
Signed-off-by: default avatarVeaceslav Falico <vfalico@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3b5c0012
...@@ -3750,11 +3750,17 @@ static int bond_neigh_init(struct neighbour *n) ...@@ -3750,11 +3750,17 @@ static int bond_neigh_init(struct neighbour *n)
* The bonding ndo_neigh_setup is called at init time beofre any * The bonding ndo_neigh_setup is called at init time beofre any
* slave exists. So we must declare proxy setup function which will * slave exists. So we must declare proxy setup function which will
* be used at run time to resolve the actual slave neigh param setup. * be used at run time to resolve the actual slave neigh param setup.
*
* It's also called by master devices (such as vlans) to setup their
* underlying devices. In that case - do nothing, we're already set up from
* our init.
*/ */
static int bond_neigh_setup(struct net_device *dev, static int bond_neigh_setup(struct net_device *dev,
struct neigh_parms *parms) struct neigh_parms *parms)
{ {
parms->neigh_setup = bond_neigh_init; /* modify only our neigh_parms */
if (parms->dev == dev)
parms->neigh_setup = bond_neigh_init;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment