From owner-freebsd-net Mon Nov 13 8:16: 3 2000 Delivered-To: freebsd-net@freebsd.org Received: from css-1.cs.iastate.edu (css-1.cs.iastate.edu [129.186.3.24]) by hub.freebsd.org (Postfix) with ESMTP id 8A27837B479 for ; Mon, 13 Nov 2000 08:15:59 -0800 (PST) Received: from popeye.cs.iastate.edu (ghelmer@popeye.cs.iastate.edu [129.186.3.4]) by css-1.cs.iastate.edu (8.9.0/8.9.0) with ESMTP id KAA24116; Mon, 13 Nov 2000 10:15:56 -0600 (CST) Received: from localhost (ghelmer@localhost) by popeye.cs.iastate.edu (8.9.0/8.9.0) with ESMTP id KAA08775; Mon, 13 Nov 2000 10:15:53 -0600 (CST) X-Authentication-Warning: popeye.cs.iastate.edu: ghelmer owned process doing -bs Date: Mon, 13 Nov 2000 10:15:52 -0600 (CST) From: Guy Helmer To: Mikel Cc: net@FreeBSD.ORG Subject: Re: "arp: XX is on xx0 but got reply from YY on yy0" message In-Reply-To: <3A0C1163.82FDA989@upan.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Fri, 10 Nov 2000, Mikel wrote: > could you maybe send a copy (or a mock copy) of your rc.conf files? The relevant lines from rc.conf would look like: network_interfaces="lo0 dc0 aue0" ifconfig_dc0="up" ifconfig_aue0="inet 10.0.0.1 netmask 255.255.255.0" > Guy Helmer wrote: > > > I'm working with a situation where a machine will have two interfaces on > > the same Ethernet segment. One interface does not have an IP address and > > is in promiscuous mode to listen to the segment; the other interface has > > an IP address and is running normally. The kernel logs a lot of "arp: XX > > is on xx0 but got reply from YY on yy0" messages. > > > > Questions also appear on the FreeBSD lists asking about this message when > > people have multiple interfaces in different IP subnets on the same wire. > > > > >From reading the source in for in_arpinput() in > > /sys/netinet/if_ether.c, it appears that the kernel just logs this message > > and harmlessly tosses the packet. If this *is* harmless, would it be OK > > to make the log message conditional on a sysctl toggle? > > > > Guy I'm proposing a sysctl, such as net.link.ether.inet.disablearpwarning, that would turn off the arp warning messages if the variable were set to a non-zero value. Untested patch: Index: if_ether.c =================================================================== RCS file: /home/ncvs/src/sys/netinet/if_ether.c,v retrieving revision 1.72 diff -u -r1.72 if_ether.c --- if_ether.c 2000/07/13 19:31:01 1.72 +++ if_ether.c 2000/11/13 16:11:51 @@ -102,6 +102,7 @@ static int arp_maxtries = 5; static int useloopback = 1; /* use loopback interface for local traffic */ static int arp_proxyall = 0; +static int disable_arp_warning = 0; SYSCTL_INT(_net_link_ether_inet, OID_AUTO, maxtries, CTLFLAG_RW, &arp_maxtries, 0, ""); @@ -109,6 +110,8 @@ &useloopback, 0, ""); SYSCTL_INT(_net_link_ether_inet, OID_AUTO, proxyall, CTLFLAG_RW, &arp_proxyall, 0, ""); +SYSCTL_INT(_net_link_ether_inet, OID_AUTO, disablearpwarning, CTLFLAG_RW, + &disable_arp_warning, 0, ""); static void arp_rtrequest __P((int, struct rtentry *, struct sockaddr *)); static void arprequest __P((struct arpcom *, @@ -557,11 +560,12 @@ if (la && (rt = la->la_rt) && (sdl = SDL(rt->rt_gateway))) { #ifndef BRIDGE /* the following is not an error when doing bridging */ if (rt->rt_ifp != &ac->ac_if) { - log(LOG_ERR, "arp: %s is on %s%d but got reply from %6D on %s%d\n", - inet_ntoa(isaddr), - rt->rt_ifp->if_name, rt->rt_ifp->if_unit, - ea->arp_sha, ":", - ac->ac_if.if_name, ac->ac_if.if_unit); + if (!disable_arp_warning) + log(LOG_ERR, "arp: %s is on %s%d but got reply from %6D on %s%d\n", + inet_ntoa(isaddr), + rt->rt_ifp->if_name, rt->rt_ifp->if_unit, + ea->arp_sha, ":", + ac->ac_if.if_name, ac->ac_if.if_unit); goto reply; } #endif Guy Helmer, Ph.D. Candidate, Iowa State University Dept. of Computer Science Research Assistant, Dept. of Computer Science --- ghelmer@cs.iastate.edu http://www.cs.iastate.edu/~ghelmer To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message