From owner-freebsd-hackers Mon Sep 3 15: 2:11 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from tao.org.uk (genius.tao.org.uk [212.135.162.51]) by hub.freebsd.org (Postfix) with ESMTP id EFE8837B407; Mon, 3 Sep 2001 15:01:58 -0700 (PDT) Received: by tao.org.uk (Postfix, from userid 100) id B205039; Mon, 3 Sep 2001 22:42:10 +0100 (BST) Date: Mon, 3 Sep 2001 22:42:10 +0100 From: Josef Karthauser To: Stephen Hurd Cc: net@FreeBSD.org Subject: Re: Patch to allow disabling logging of arp movements through sysctl Message-ID: <20010903224210.C28738@tao.org.uk> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="XWOWbaMNXpFDWE00" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from deuce@lordlegacy.org on Mon, Sep 03, 2001 at 03:43:41PM -0600 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --XWOWbaMNXpFDWE00 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable You should really send this to net@FreeBSD.org (Cc'd). Filing a -PR is a g= ood thing too, as you can always refer to the -PR number in any mail to the list. Joe On Mon, Sep 03, 2001 at 03:43:41PM -0600, Stephen Hurd wrote: > 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 e= nds up > filling my log with: >=20 > 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 >=20 > 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 patc= h to > add the sysctl variable net.link.ether.inet.log_arp_movements >=20 > Is this the "right place" to send the patch or should I file a PR? >=20 > --- /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 =3D 1; > +static int log_arp_movements =3D 1; >=20 > 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"); > + >=20 > 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), >=20 >=20 >=20 > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message --XWOWbaMNXpFDWE00 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjuT+TIACgkQXVIcjOaxUBbOQgCfXAgDr/cKnisbgYtyLsvRIKE2 5lkAoLv44vcnXbdZaFEIJblklS2fIdXS =AW1l -----END PGP SIGNATURE----- --XWOWbaMNXpFDWE00-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message