From: Ian Campbell <ian.campbell@citrix.com>
To: netdev@vger.kernel.org
Cc: Ian Campbell <ian.campbell@citrix.com>,
Stephen Hemminger <shemminger@linux-foundation.org>,
Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>,
"David S. Miller" <davem@davemloft.net>,
stable@kernel.org
Subject: [PATCH] arp_notify: generate arp_notify event on NETDEV_CHANGE too
Date: Wed, 12 May 2010 14:40:29 +0100 [thread overview]
Message-ID: <1273671629-15577-2-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1273671554.7572.11190.camel@zakaz.uk.xensource.com>
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 <ian.campbell@citrix.com>
Cc: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: David S. Miller <davem@davemloft.net>
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
next prev parent reply other threads:[~2010-05-12 13:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-12 13:39 [PATCH 0/2] fixes to arp_notify for virtual machine migration use case Ian Campbell
2010-05-12 13:40 ` [PATCH] arp_notify: generate broadcast ARP reply not request Ian Campbell
2010-05-12 13:40 ` Ian Campbell [this message]
2010-05-24 6:37 ` [PATCH 0/2] fixes to arp_notify for virtual machine migration use case David Miller
2010-05-25 9:20 ` Ian Campbell
2010-05-26 6:08 ` David Miller
2010-05-26 10:08 ` Ian Campbell
2010-05-26 10:09 ` [PATCH 1/3] arp_notify: document that a gratuitous ARP request is sent when this option is enabled Ian Campbell
2010-05-26 10:09 ` [PATCH 2/3] arp_notify: allow drivers to explicitly request a notification event Ian Campbell
2010-05-26 10:09 ` [PATCH 3/3] xen: netfront: explicitly generate arp_notify event after migration Ian Campbell
2010-05-31 7:32 ` [PATCH 0/2] fixes to arp_notify for virtual machine migration use case David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1273671629-15577-2-git-send-email-ian.campbell@citrix.com \
--to=ian.campbell@citrix.com \
--cc=davem@davemloft.net \
--cc=jeremy.fitzhardinge@citrix.com \
--cc=netdev@vger.kernel.org \
--cc=shemminger@linux-foundation.org \
--cc=stable@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).