diff options
author | glebius <glebius@FreeBSD.org> | 2005-12-18 19:11:56 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2005-12-18 19:11:56 +0000 |
commit | cfbe2fd3f720064a5107704865ff523b8453bad9 (patch) | |
tree | bc875b79fcdd831041264850c2270cfc7001857d /sys/netinet | |
parent | 175e16aa4df4f5510a7a395b24bd5ac9a00145f9 (diff) | |
download | FreeBSD-src-cfbe2fd3f720064a5107704865ff523b8453bad9.zip FreeBSD-src-cfbe2fd3f720064a5107704865ff523b8453bad9.tar.gz |
Add a knob to suppress logging of attempts to modify
permanent ARP entries.
Submitted by: Andrew Alcheyev <buddy telenet.ru>
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/if_ether.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index 23ee429..28f7d44 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -570,6 +570,7 @@ arpintr(struct mbuf *m) */ static int log_arp_wrong_iface = 1; static int log_arp_movements = 1; +static int log_arp_permanent_modify = 1; SYSCTL_INT(_net_link_ether_inet, OID_AUTO, log_arp_wrong_iface, CTLFLAG_RW, &log_arp_wrong_iface, 0, @@ -577,6 +578,9 @@ SYSCTL_INT(_net_link_ether_inet, OID_AUTO, log_arp_wrong_iface, CTLFLAG_RW, SYSCTL_INT(_net_link_ether_inet, OID_AUTO, log_arp_movements, CTLFLAG_RW, &log_arp_movements, 0, "log arp replies from MACs different than the one in the cache"); +SYSCTL_INT(_net_link_ether_inet, OID_AUTO, log_arp_permanent_modify, CTLFLAG_RW, + &log_arp_permanent_modify, 0, + "log arp replies from MACs different than the one in the permanent arp entry"); static void @@ -721,12 +725,13 @@ match: ifp->if_addrlen, (u_char *)ar_sha(ah), ":", ifp->if_xname); } else { - log(LOG_ERR, - "arp: %*D attempts to modify permanent entry for %s on %s\n", - ifp->if_addrlen, (u_char *)ar_sha(ah), ":", - inet_ntoa(isaddr), ifp->if_xname); - RT_UNLOCK(rt); - goto reply; + RT_UNLOCK(rt); + if (log_arp_permanent_modify) + log(LOG_ERR, "arp: %*D attempts to modify " + "permanent entry for %s on %s\n", + ifp->if_addrlen, (u_char *)ar_sha(ah), ":", + inet_ntoa(isaddr), ifp->if_xname); + goto reply; } } /* |