Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Nov 2000 10:15:52 -0600 (CST)
From:      Guy Helmer <ghelmer@cs.iastate.edu>
To:        Mikel <mikel@upan.org>
Cc:        net@FreeBSD.ORG
Subject:   Re: "arp: XX is on xx0 but got reply from YY on yy0" message
Message-ID:  <Pine.HPX.4.05.10011131002180.28204-100000@popeye.cs.iastate.edu>
In-Reply-To: <3A0C1163.82FDA989@upan.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.HPX.4.05.10011131002180.28204-100000>