Date: Tue, 18 Sep 2001 12:05:05 +0400 (MSD) From: Maxim Konovalov <maxim@macomnet.ru> To: Matthew Luckie <kluckie@ihug.co.nz> Cc: <net@FreeBSD.ORG> Subject: Re: arp X moved from Y to Z messages Message-ID: <Pine.BSF.4.33.0109181203480.83980-100000@news1.macomnet.ru> In-Reply-To: <001501c14017$9c2e73c0$0a00a8c0@neoprene>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello,
On Tue, 18 Sep 2001, Matthew Luckie wrote:
> Hi there
>
> At work there are several freebsd machines that route packets through a
> "load balanced" or "redundant" router configuration.
> The gateway's IP address actually refers to two different machines.
> Naturally the gateway is used quite a bit, and the syslog fills up with "arp
> X moved from Y to Z on fxp0" messages.
>
> I'm guessing that not many people would have this problem.
> Below is a patch that I have found useful for these machines.
> I'm aware that there are security considerations with this patch; by default
> the sysctl is not activated.
There *is* a sysctl for it:
$ sysctl net.link.ether.inet.log_arp_wrong_iface=0
> I'm not subscribed to the list, CC me on any responses please.
>
> Matthew
>
> --- if_ether.c.orig Tue Sep 18 13:56:16 2001
> +++ if_ether.c Tue Sep 18 14:27:46 2001
> @@ -502,6 +502,12 @@
> &log_arp_wrong_iface, 0,
> "log arp packets arriving on the wrong interface");
>
> +static int log_arp_moved = 1;
> +
> +SYSCTL_INT(_net_link_ether_inet, OID_AUTO, log_arp_moved, CTLFLAG_RW,
> + &log_arp_moved, 0,
> + "log arp moved");
> +
> static void
> in_arpinput(m)
> struct mbuf *m;
> @@ -586,12 +592,13 @@
> }
> 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_moved)
> 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),
>
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-net" in the body of the message
>
>
--
Maxim Konovalov, MAcomnet, Internet-Intranet Dept., system engineer
phone: +7 (095) 796-9079, mailto: maxim@macomnet.ru
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.33.0109181203480.83980-100000>
