From patchwork Mon Apr 2 16:17:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Or Gerlitz X-Patchwork-Id: 150185 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id F316CB6F6E for ; Tue, 3 Apr 2012 02:17:32 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753027Ab2DBQRX (ORCPT ); Mon, 2 Apr 2012 12:17:23 -0400 Received: from eu1sys200aog112.obsmtp.com ([207.126.144.133]:39632 "HELO eu1sys200aog112.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752243Ab2DBQRW (ORCPT ); Mon, 2 Apr 2012 12:17:22 -0400 Received: from mtlsws123.lab.mtl.com ([82.166.227.17]) (using TLSv1) by eu1sys200aob112.postini.com ([207.126.147.11]) with SMTP ID DSNKT3nRC0CvFsKZfY7+BWYduhaBNlp93tVT@postini.com; Mon, 02 Apr 2012 16:17:21 UTC Received: from r-vnc07.lab.mtl.com (r-vnc07.lab.mtl.com [10.208.0.119]) by mtlsws123.lab.mtl.com (8.13.8/8.13.8) with ESMTP id q32GHCqu003798; Mon, 2 Apr 2012 19:17:14 +0300 From: Or Gerlitz To: davem@davemloft.net Cc: roland@kernel.org, netdev@vger.kernel.org, fubar@us.ibm.com, Or Gerlitz , Shlomo Pongratz Subject: [PATCH net 1/2] net/bonding: emit address change event in more places Date: Mon, 2 Apr 2012 19:17:09 +0300 Message-Id: <1333383430-17456-2-git-send-email-ogerlitz@mellanox.com> X-Mailer: git-send-email 1.7.8.2 In-Reply-To: <1333383430-17456-1-git-send-email-ogerlitz@mellanox.com> References: <1333383430-17456-1-git-send-email-ogerlitz@mellanox.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Shlomo Pongratz commit 7d26bb103c4 "bonding: emit event when bonding changes MAC" didn't take care to emit the NETDEV_CHANGEADDR event in other places where bonding actually changes the mac address (to all zeroes), in bond_release, and bond_release_all. 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 --- drivers/net/bonding/bond_main.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index a20b585..b0a278d 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)) @@ -2218,6 +2221,8 @@ static int bond_release_all(struct net_device *bond_dev) out: write_unlock_bh(&bond->lock); + call_netdevice_notifiers(NETDEV_CHANGEADDR, bond->dev); + bond_compute_features(bond); return 0;