Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet Don't handle ARP duplication for the unspecified...
details: https://anonhg.NetBSD.org/src/rev/b294e3ce39c3
branches: trunk
changeset: 348752:b294e3ce39c3
user: roy <roy%NetBSD.org@localhost>
date: Sat Nov 05 20:03:15 2016 +0000
description:
Don't handle ARP duplication for the unspecified address.
diffstat:
sys/netinet/if_arp.c | 21 ++++++++++-----------
1 files changed, 10 insertions(+), 11 deletions(-)
diffs (50 lines):
diff -r 20ff86b6fa9b -r b294e3ce39c3 sys/netinet/if_arp.c
--- a/sys/netinet/if_arp.c Sat Nov 05 15:52:35 2016 +0000
+++ b/sys/netinet/if_arp.c Sat Nov 05 20:03:15 2016 +0000
@@ -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 @@
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 @@
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;
Home |
Main Index |
Thread Index |
Old Index