netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net/ipv4/arp.c: Fix arp reply when sender ip 0 (was: Strange behavior in arp probe reply, bug or feature?)
@ 2007-11-15 11:40 Jonas Danielsson
  2007-11-15 15:40 ` Alexey Kuznetsov
  0 siblings, 1 reply; 12+ messages in thread
From: Jonas Danielsson @ 2007-11-15 11:40 UTC (permalink / raw)
  To: linux-kernel; +Cc: davem, kuznet, jmorris, netdev, akpm

Fix arp reply when received arp probe with sender ip 0.

Can't find any ground in RFC2131 to send a non-valid arp-reply in
the special case of sender ip being set to 0.

- Bug fix for arp handling when sender ip is set to 0.
Send a correct arp reply instead of one with sender ip and sender
hardware adress in target fields.

Now sends target ip and target hw as received in arp probe.

Signed-off-by: Jonas Danielsson <the.sator@gmail.com>

---
arp.c |    3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Index: arp.c
===================================================================
RCS file: /usr/local/cvs/linux/os/linux-2.6/net/ipv4/arp.c,v
retrieving revision 1.22
diff -u -w -r1.22 arp.c
--- arp.c	13 Oct 2006 12:45:47 -0000	1.22
+++ arp.c	15 Nov 2007 10:34:44 -0000
@@ -827,7 +827,8 @@
 		if (arp->ar_op == htons(ARPOP_REQUEST) &&
 		    inet_addr_type(tip) == RTN_LOCAL &&
 		    !arp_ignore(in_dev,dev,sip,tip))
-			arp_send(ARPOP_REPLY,ETH_P_ARP,tip,dev,tip,sha,dev->dev_addr,dev->dev_addr);
+			arp_send(ARPOP_REPLY, ETH_P_ARP, sip, dev, tip, sha,
+				 dev->dev_addr, sha);
 		goto out;
 	}

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2007-11-20  7:49 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-15 11:40 [PATCH] net/ipv4/arp.c: Fix arp reply when sender ip 0 (was: Strange behavior in arp probe reply, bug or feature?) Jonas Danielsson
2007-11-15 15:40 ` Alexey Kuznetsov
2007-11-15 21:40   ` Jonas Danielsson
2007-11-15 23:28     ` [PATCH] net/ipv4/arp.c: Fix arp reply when sender ip 0 David Miller
2007-11-16  8:30       ` Jonas Danielsson
2007-11-16  9:05         ` David Miller
2007-11-16 14:13           ` Benny Amorsen
2007-11-16 19:26           ` Bill Fink
2007-11-17 22:14             ` Jarek Poplawski
2007-11-19 13:06     ` [PATCH] net/ipv4/arp.c: Fix arp reply when sender ip 0 (was: Strange behavior in arp probe reply, bug or feature?) Alexey Kuznetsov
2007-11-20  5:16       ` Bill Fink
2007-11-20  7:49         ` [PATCH] net/ipv4/arp.c: Fix arp reply when sender ip 0 David Miller

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).