From owner-freebsd-net Tue Sep 18 1:11: 5 2001 Delivered-To: freebsd-net@freebsd.org Received: from relay1.macomnet.ru (relay1.macomnet.ru [195.128.64.10]) by hub.freebsd.org (Postfix) with ESMTP id A46C437B414 for ; Tue, 18 Sep 2001 01:10:58 -0700 (PDT) Received: from news1.macomnet.ru (maxim@news1.macomnet.ru [195.128.64.14]) by relay1.macomnet.ru (8.11.3/8.11.3) with ESMTP id f8I8Ask12955841; Tue, 18 Sep 2001 12:10:54 +0400 (MSD) Date: Tue, 18 Sep 2001 12:10:52 +0400 (MSD) From: Maxim Konovalov To: Matthew Luckie Cc: Subject: Re: arp X moved from Y to Z messages In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Oh, i am sorry, i was wrong, net.link.ether.inet.log_arp_wrong_iface is for another problem. On Tue, 18 Sep 2001, Maxim Konovalov wrote: > > 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