From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: [PATCH] arp_notify: generate arp_notify event on NETDEV_CHANGE too Date: Wed, 12 May 2010 14:40:29 +0100 Message-ID: <1273671629-15577-2-git-send-email-ian.campbell@citrix.com> References: <1273671554.7572.11190.camel@zakaz.uk.xensource.com> Cc: Ian Campbell , Stephen Hemminger , Jeremy Fitzhardinge , "David S. Miller" , stable@kernel.org To: netdev@vger.kernel.org Return-path: Received: from smtp02.citrix.com ([66.165.176.63]:41506 "EHLO SMTP02.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751113Ab0ELNtJ (ORCPT ); Wed, 12 May 2010 09:49:09 -0400 In-Reply-To: <1273671554.7572.11190.camel@zakaz.uk.xensource.com> Sender: netdev-owner@vger.kernel.org List-ID: One of the use cases of the arp_notify functionality added in commit eefef1 "net: add ARP notify option for devices" is to enable faster network recovery after a virtual machine migration. However a migration appears to the network subsystem as a temporary loss of carrier rather than a down/up pair or an address change etc therefore no gratuitous ARP is sent. Send one in the NETDEV_CHANGE (generated by netif_carrier_{on,off}) case too. This catches carrier down events too but that should be harmless. Signed-off-by: Ian Campbell Cc: Stephen Hemminger Cc: Jeremy Fitzhardinge Cc: David S. Miller Cc: netdev@vger.kernel.org Cc: stable@kernel.org --- net/ipv4/devinet.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index e26f723..5b04124 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -1081,6 +1081,7 @@ static int inetdev_event(struct notifier_block *this, unsigned long event, } ip_mc_up(in_dev); /* fall through */ + case NETDEV_CHANGE: case NETDEV_CHANGEADDR: /* Send gratuitous ARP to notify of link change */ if (IN_DEV_ARP_NOTIFY(in_dev)) { -- 1.5.6.5