From: Jonas Danielsson Date: Wed, 21 Nov 2007 01:38:16 +0000 (-0800) Subject: [ARP]: Fix arp reply when sender ip 0 X-Git-Tag: v2.6.24-rc4~90^2~14 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4a9811c42ecb70b2f0b375f6d4c77ab34d1f598;p=linux-2.6 [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 Acked-by: Alexey Kuznetov Signed-off-by: David S. Miller --- diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index 36d6798947..15ca729f70 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c @@ -828,7 +828,8 @@ static int arp_process(struct sk_buff *skb) 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; }