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 broadcast ARP reply not request.
Date: Wed, 12 May 2010 14:40:28 +0100 [thread overview]
Message-ID: <1273671629-15577-1-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1273671554.7572.11190.camel@zakaz.uk.xensource.com>
The arp_notify option causes us to send a broadcast ARP request
with the host IP address in both the source and destination IP address
fields. More usually a gratuitous ARP packet is a broadcast ARP reply
with a broadcast destination IP and the local IP as the source
The documentation of the arp_notify option in
Documentation/networking/ip-sysctl.txt suggests this was the original
intention therefore switch it over.
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 | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 90e3d63..e26f723 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1087,10 +1087,10 @@ static int inetdev_event(struct notifier_block *this, unsigned long event,
struct in_ifaddr *ifa = in_dev->ifa_list;
if (ifa)
- arp_send(ARPOP_REQUEST, ETH_P_ARP,
- ifa->ifa_address, dev,
- ifa->ifa_address, NULL,
- dev->dev_addr, NULL);
+ arp_send(ARPOP_REPLY, ETH_P_ARP,
+ INADDR_BROADCAST, dev,
+ ifa->ifa_address,
+ NULL, NULL, dev->dev_addr);
}
break;
case NETDEV_DOWN:
--
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 ` Ian Campbell [this message]
2010-05-12 13:40 ` [PATCH] arp_notify: generate arp_notify event on NETDEV_CHANGE too Ian Campbell
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-1-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).