diff options
author | rwatson <rwatson@FreeBSD.org> | 2004-10-12 17:10:40 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2004-10-12 17:10:40 +0000 |
commit | 338d30714650307d7f533e47d45ae6e5b1e68e7d (patch) | |
tree | 9bc6a0d644000f5f633cf440b2f06a7b4e8724d4 /sys/netinet | |
parent | 84c4649f53d9e8ac44396ce955e0fb73143a97c6 (diff) | |
download | FreeBSD-src-338d30714650307d7f533e47d45ae6e5b1e68e7d.zip FreeBSD-src-338d30714650307d7f533e47d45ae6e5b1e68e7d.tar.gz |
Modify the thrilling "%D is using my IP address %s!" message so that
it isn't printed if the IP address in question is '0.0.0.0', which is
used by nodes performing DHCP lookup, and so constitute a false
positive as a report of misconfiguration.
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/if_ether.c | 8 |
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), ":", |