diff options
author | alfred <alfred@FreeBSD.org> | 2001-09-03 21:53:15 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2001-09-03 21:53:15 +0000 |
commit | 3cb94e51589e84ebbb8a1c5722d223eac4620004 (patch) | |
tree | 8de4563fb9f485a888584ce63d0b86e07cce07f2 /sys/netinet | |
parent | 4a8dc7084c0c317b0ddd66c13d45738cdce0f1cb (diff) | |
download | FreeBSD-src-3cb94e51589e84ebbb8a1c5722d223eac4620004.zip FreeBSD-src-3cb94e51589e84ebbb8a1c5722d223eac4620004.tar.gz |
Allow disabling of "arp moved" messages.
Submitted by: Stephen Hurd <deuce@lordlegacy.org>
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/if_ether.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index 8c8f01f..dd82925 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -506,10 +506,15 @@ arpintr() * but formerly didn't normally send requests. */ static int log_arp_wrong_iface = 1; +static int log_arp_movements = 1; SYSCTL_INT(_net_link_ether_inet, OID_AUTO, log_arp_wrong_iface, CTLFLAG_RW, &log_arp_wrong_iface, 0, "log arp packets arriving on the wrong interface"); +SYSCTL_INT(_net_link_ether_inet, OID_AUTO, log_arp_movements, CTLFLAG_RW, + &log_arp_movements, 0, + "log arp replies from MACs different the the one in the cache"); + static void in_arpinput(m) @@ -595,12 +600,13 @@ in_arpinput(m) } if (sdl->sdl_alen && bcmp((caddr_t)ea->arp_sha, LLADDR(sdl), sdl->sdl_alen)) { - if (rt->rt_expire) - log(LOG_INFO, "arp: %s moved from %6D to %6D on %s%d\n", - inet_ntoa(isaddr), (u_char *)LLADDR(sdl), ":", - ea->arp_sha, ":", - ac->ac_if.if_name, ac->ac_if.if_unit); - else { + if (rt->rt_expire) { + if (log_arp_movements) + log(LOG_INFO, "arp: %s moved from %6D to %6D on %s%d\n", + inet_ntoa(isaddr), (u_char *)LLADDR(sdl), ":", + ea->arp_sha, ":", + ac->ac_if.if_name, ac->ac_if.if_unit); + } else { log(LOG_ERR, "arp: %6D attempts to modify permanent entry for %s on %s%d\n", ea->arp_sha, ":", inet_ntoa(isaddr), |