Re: [BUG] 2.6.29-rc* QinQ vlan trunking regression

From: Patrick McHardy
Date: Thu Mar 05 2009 - 04:08:26 EST


David Miller wrote:
> From: David Miller <davem@xxxxxxxxxxxxx>
> Date: Thu, 05 Mar 2009 00:56:46 -0800 (PST)
>
>
>> Then bond_neigh_setup() has the same bug, doesn't it?
>>

Indeed. But this seems to be the last one.
>
> Looking at the bond_main.c changes in:
>
> commit 008298231abbeb91bc7be9e8b078607b816d1a4a
> Author: Stephen Hemminger <shemminger@xxxxxxxxxx>
> Date: Thu Nov 20 20:14:53 2008 -0800
>
> netdev: add more functions to netdevice ops
>
> shows that it always behaved that way.
>

Yes, but that patch introduced the requirement to pass the correct
device down since now the handlers need it to get to the ops of the
underlying device. Previously they all relied on the handlers not
using their private data.

Signed-off-by: Patrick McHardy <kaber@xxxxxxxxx>
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 9fb3883..383ce48 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -4113,7 +4113,7 @@ static int bond_neigh_setup(struct net_device *dev, struct neigh_parms *parms)
const struct net_device_ops *slave_ops
= slave->dev->netdev_ops;
if (slave_ops->ndo_neigh_setup)
- return slave_ops->ndo_neigh_setup(dev, parms);
+ return slave_ops->ndo_neigh_setup(slave, parms);
}
return 0;
}