diff mbox

[net,V1,1/2] net/bonding: emit address change event also in bond_release

Message ID 1333529780-28421-2-git-send-email-ogerlitz@mellanox.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Or Gerlitz April 4, 2012, 8:56 a.m. UTC
From: Shlomo Pongratz <shlomop@mellanox.com>

commit 7d26bb103c4 "bonding: emit event when bonding changes MAC" didn't
take care to emit the NETDEV_CHANGEADDR event in bond_release, where bonding
actually changes the mac address (to all zeroes). As a result the neighbours
aren't deleted by the core networking code (which does so upon getting that
event).

Signed-off-by: Shlomo Pongratz <shlomop@mellanox.com>
---
 drivers/net/bonding/bond_main.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Comments

Jay Vosburgh April 4, 2012, 4:57 p.m. UTC | #1
Or Gerlitz <ogerlitz@mellanox.com> wrote:

>From: Shlomo Pongratz <shlomop@mellanox.com>
>
>commit 7d26bb103c4 "bonding: emit event when bonding changes MAC" didn't
>take care to emit the NETDEV_CHANGEADDR event in bond_release, where bonding
>actually changes the mac address (to all zeroes). As a result the neighbours
>aren't deleted by the core networking code (which does so upon getting that
>event).
>
>Signed-off-by: Shlomo Pongratz <shlomop@mellanox.com>

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>

>---
> drivers/net/bonding/bond_main.c |    3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
>diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
>index a20b585..d38f635 100644
>--- a/drivers/net/bonding/bond_main.c
>+++ b/drivers/net/bonding/bond_main.c
>@@ -2035,6 +2035,9 @@ int bond_release(struct net_device *bond_dev, struct net_device *slave_dev)
> 	write_unlock_bh(&bond->lock);
> 	unblock_netpoll_tx();
>
>+	if (bond->slave_cnt == 0)
>+		call_netdevice_notifiers(NETDEV_CHANGEADDR, bond->dev);
>+
> 	bond_compute_features(bond);
> 	if (!(bond_dev->features & NETIF_F_VLAN_CHALLENGED) &&
> 	    (old_features & NETIF_F_VLAN_CHALLENGED))
>-- 
>1.7.1
>

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller April 4, 2012, 10:12 p.m. UTC | #2
From: Or Gerlitz <ogerlitz@mellanox.com>
Date: Wed,  4 Apr 2012 11:56:19 +0300

> From: Shlomo Pongratz <shlomop@mellanox.com>
> 
> commit 7d26bb103c4 "bonding: emit event when bonding changes MAC" didn't
> take care to emit the NETDEV_CHANGEADDR event in bond_release, where bonding
> actually changes the mac address (to all zeroes). As a result the neighbours
> aren't deleted by the core networking code (which does so upon getting that
> event).
> 
> Signed-off-by: Shlomo Pongratz <shlomop@mellanox.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index a20b585..d38f635 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -2035,6 +2035,9 @@  int bond_release(struct net_device *bond_dev, struct net_device *slave_dev)
 	write_unlock_bh(&bond->lock);
 	unblock_netpoll_tx();
 
+	if (bond->slave_cnt == 0)
+		call_netdevice_notifiers(NETDEV_CHANGEADDR, bond->dev);
+
 	bond_compute_features(bond);
 	if (!(bond_dev->features & NETIF_F_VLAN_CHALLENGED) &&
 	    (old_features & NETIF_F_VLAN_CHALLENGED))