Module Name:    src
Committed By:   roy
Date:           Sat Nov  5 20:03:15 UTC 2016

Modified Files:
        src/sys/netinet: if_arp.c

Log Message:
Don't handle ARP duplication for the unspecified address.


To generate a diff of this commit:
cvs rdiff -u -r1.231 -r1.232 src/sys/netinet/if_arp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/netinet/if_arp.c
diff -u src/sys/netinet/if_arp.c:1.231 src/sys/netinet/if_arp.c:1.232
--- src/sys/netinet/if_arp.c:1.231	Tue Oct 18 07:30:31 2016
+++ src/sys/netinet/if_arp.c	Sat Nov  5 20:03:15 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_arp.c,v 1.231 2016/10/18 07:30:31 ozaki-r Exp $	*/
+/*	$NetBSD: if_arp.c,v 1.232 2016/11/05 20:03:15 roy Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.231 2016/10/18 07:30:31 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.232 2016/11/05 20:03:15 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -1137,8 +1137,15 @@ in_arpinput(struct mbuf *m)
 	else if (in_hosteq(isaddr, myaddr))
 		ARP_STATINC(ARP_STAT_RCVLOCALSPA);
 
-	if (in_nullhost(itaddr))
+	/*
+	 * If the target IP address is zero, ignore the packet.
+	 * This prevents the code below from tring to answer
+	 * when we are using IP address zero (booting).
+	 */
+	if (in_nullhost(itaddr)) {
 		ARP_STATINC(ARP_STAT_RCVZEROTPA);
+		goto out;
+	}
 
 	/* DAD check, RFC 5227 */
 	if (in_hosteq(isaddr, myaddr) ||
@@ -1149,14 +1156,6 @@ in_arpinput(struct mbuf *m)
 		goto out;
 	}
 
-	/*
-	 * If the target IP address is zero, ignore the packet.
-	 * This prevents the code below from tring to answer
-	 * when we are using IP address zero (booting).
-	 */
-	if (in_nullhost(itaddr))
-		goto out;
-
 	if (in_nullhost(isaddr))
 		goto reply;
 

Reply via email to