1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00

Allow disabling of "arp moved" messages.

Submitted by: Stephen Hurd <deuce@lordlegacy.org>
This commit is contained in:
Alfred Perlstein 2001-09-03 21:53:15 +00:00
parent 4d2c57188f
commit e3d123d63d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=82893

View File

@ -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)
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 {
} else {
log(LOG_ERR,
"arp: %6D attempts to modify permanent entry for %s on %s%d\n",
ea->arp_sha, ":", inet_ntoa(isaddr),