aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Danielsson <the.sator@gmail.com>2007-11-20 20:38:16 -0500
committerDavid S. Miller <davem@davemloft.net>2007-11-20 20:38:16 -0500
commitb4a9811c42ecb70b2f0b375f6d4c77ab34d1f598 (patch)
tree84cb96d0195a995b6d5bd5ca31c6c270e6097dbc
parent77adefdc9863d63f8d8bdc6a9adcdf9a6b0e2410 (diff)
[ARP]: Fix arp reply when sender ip 0
Fix arp reply when received arp probe with sender ip 0. Send arp reply with target ip address 0.0.0.0 and target hardware address set to hardware address of requester. Previously sent reply with target ip address and target hardware address set to same as source fields. Signed-off-by: Jonas Danielsson <the.sator@gmail.com> Acked-by: Alexey Kuznetov <kuznet@ms2.inr.ac.ru> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ipv4/arp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index 36d6798947b5..15ca729f7084 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -828,7 +828,8 @@ static int arp_process(struct sk_buff *skb)
828 if (arp->ar_op == htons(ARPOP_REQUEST) && 828 if (arp->ar_op == htons(ARPOP_REQUEST) &&
829 inet_addr_type(tip) == RTN_LOCAL && 829 inet_addr_type(tip) == RTN_LOCAL &&
830 !arp_ignore(in_dev,dev,sip,tip)) 830 !arp_ignore(in_dev,dev,sip,tip))
831 arp_send(ARPOP_REPLY,ETH_P_ARP,tip,dev,tip,sha,dev->dev_addr,dev->dev_addr); 831 arp_send(ARPOP_REPLY, ETH_P_ARP, sip, dev, tip, sha,
832 dev->dev_addr, sha);
832 goto out; 833 goto out;
833 } 834 }
834 835