net/bonding: emit address change event also in bond_release
authorShlomo Pongratz <shlomop@mellanox.com>
Tue, 3 Apr 2012 22:56:19 +0000 (22:56 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Apr 2012 22:11:12 +0000 (18:11 -0400)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_main.c

index 941b4e189adf67391ac06c8effefa820fbd0d5cb..5cb85cb0be4f4b8f3b70edc71ee4be2111fb68e6 100644 (file)
@@ -2034,6 +2034,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))