summaryrefslogtreecommitdiffstats
path: root/sys/netinet/if_ether.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet/if_ether.c')
-rw-r--r--sys/netinet/if_ether.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index bcd44d0..92df01b 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -577,7 +577,13 @@ match:
inet_ntoa(isaddr));
goto drop;
}
- if (isaddr.s_addr == myaddr.s_addr) {
+ /*
+ * Warn if another host is using the same IP address, but only if the
+ * IP address isn't 0.0.0.0, which is used for DHCP only, in which
+ * case we suppress the warning to avoid false positive complaints of
+ * potential misconfiguration.
+ */
+ if (isaddr.s_addr == myaddr.s_addr && myaddr.s_addr != 0) {
log(LOG_ERR,
"arp: %*D is using my IP address %s!\n",
ifp->if_addrlen, (u_char *)ar_sha(ah), ":",
OpenPOWER on IntegriCloud