Date: Mon, 3 Sep 2001 15:43:41 -0600 From: "Stephen Hurd" <deuce@lordlegacy.org> To: "FreeBSD-Hackers" <hackers@FreeBSD.org> Subject: Patch to allow disabling logging of arp movements through sysctl Message-ID: <NFBBJPHLGLNJEEECOCHAOELACBAA.deuce@lordlegacy.org>
index | next in thread | raw e-mail
I've had a problem with my DSL connection for some time now, the bridging they
use appears to forward arp responses AND respond to arp requests. This ends up
filling my log with:
Sep 3 15:17:57 tw2 /kernel: arp: 216.13.207.2 moved from 00:06:29:d5:04:c7 to
00:10:b5:4f:d1:1a on rl0
Sep 3 15:17:57 tw2 /kernel: arp: 216.13.207.2 moved from 00:10:b5:4f:d1:1a to
00:06:29:d5:04:c7 on rl0
I've dug around on the list archives, and it looks like I'm not the first person
to get annoyed at this, but I haven't found a solution. So, I've finally gotten
so annoyed at my huge logs that I broke down and added the following patch to
add the sysctl variable net.link.ether.inet.log_arp_movements
Is this the "right place" to send the patch or should I file a PR?
--- /usr/src/sys/netinet/if_ether.c.old Mon Sep 3 14:26:38 2001
+++ /usr/src/sys/netinet/if_ether.c Mon Sep 3 15:13:08 2001
@@ -497,10 +497,15 @@
* 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)
@@ -586,12 +591,13 @@
}
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),
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?NFBBJPHLGLNJEEECOCHAOELACBAA.deuce>
