Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Oct 2001 16:58:21 -0700
From:      Mark Peek <mark@whistle.com>
To:        Harti Brandt <brandt@fokus.gmd.de>
Cc:        <current@FreeBSD.ORG>, Jonathan Lemon <jlemon@FreeBSD.org>
Subject:   Re: arp: <some ether addr> is using my IP address 0.0.0.0!  ??!?!?
Message-ID:  <p05101000b7f66be9c96e@[207.76.207.129]>
In-Reply-To: <20011018111945.H1072-100000@beagle.fokus.gmd.de>
References:  <20011018111945.H1072-100000@beagle.fokus.gmd.de>

next in thread | previous in thread | raw e-mail | index | archive | help
At 11:23 AM +0200 10/18/01, Harti Brandt wrote:
>On Thu, 18 Oct 2001, Max Khon wrote:
>
>MK>hi, there!
>MK>
>MK>On Thu, Oct 18, 2001 at 12:00:52AM +0200, Jose M. Alcaide wrote:
>MK>
>MK>> On Wed, Oct 17, 2001 at 12:11:45PM -0700, Julian Elischer wrote:
>MK>> > I've seen this when DHCP fails to allocate an address.
>MK>> >
>MK>>
>MK>> But I am not using DHCP. Maybe there are other machines in the LAN (it is
>MK>> a *big* LAN) trying to get their addresses using DHCP, and now -CURRENT
>MK>> shows a message whenever detects one of those packets. I will try to
>MK>> identify the senders (over 40!).
>MK>>
>MK>> Anyway, these "0.0.0.0" ARP messages are new in -CURRENT, and none of our
>MK>> machines running FreeBSD 4.x show them.
>MK>
>MK>how current -CURRENT are you running?
>
>I have these two on a yesterday's current and remember that they appeared
>after I saw a commit message approx. 2 weeks ago about adding hashing of
>inet addresses (maybe rev. 1.83 of if_ether.c).


Yes, it does appear to be due to this commit. The first address on the
interface queue has an address of 0.0.0.0. Here's a patch that works for
me to block the messages. I'm guessing at the correct behavior so use at
your own risk. At least the voices^Wlog messages have stopped. :-)

Mark

------
Index: if_ether.c
===================================================================
RCS file: /cvs/freebsd/src/sys/netinet/if_ether.c,v
retrieving revision 1.85
diff -u -r1.85 if_ether.c
--- if_ether.c	2001/10/17 18:07:05	1.85
+++ if_ether.c	2001/10/19 23:53:44
@@ -593,15 +593,19 @@
 		    isaddr.s_addr == ia->ia_addr.sin_addr.s_addr)
 			goto match;
 	/*
-	 * No match, use the first address on the receive interface
-	 * as a dummy address for the rest of the function.
+	 * No match, use the first non-0.0.0.0 address on the receive
+	 * interface as a dummy address for the rest of the function.
 	 */
-	ifa = TAILQ_FIRST(&ifp->if_addrhead);
-	if (ifa == NULL) {
-		m_freem(m);
-		return;
-	}
-	ia = ifatoia(ifa);
+	TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link)
+		if (ifatoia(ifa)->ia_addr.sin_addr.s_addr != 0) {
+			ia = ifatoia(ifa);
+			goto match;
+		}
+
+	/* No applicable interface/address so bail... */
+	m_freem(m);
+	return;
+
 match:
 	myaddr = ia->ia_addr.sin_addr;
 	if (!bcmp(ar_sha(ah), IF_LLADDR(ifp), ifp->if_addrlen)) {

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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