From owner-freebsd-current Fri Oct 19 16:59: 4 2001 Delivered-To: freebsd-current@freebsd.org Received: from alpo.whistle.com (s206m1.whistle.com [207.76.206.1]) by hub.freebsd.org (Postfix) with ESMTP id 27A3837B401; Fri, 19 Oct 2001 16:58:59 -0700 (PDT) Received: from [207.76.207.129] (PBG4.whistle.com [207.76.207.129]) by alpo.whistle.com (8.9.1a/8.9.1) with ESMTP id QAA65372; Fri, 19 Oct 2001 16:58:26 -0700 (PDT) Mime-Version: 1.0 X-Sender: mark-ml@207.76.206.1 Message-Id: In-Reply-To: <20011018111945.H1072-100000@beagle.fokus.gmd.de> References: <20011018111945.H1072-100000@beagle.fokus.gmd.de> Date: Fri, 19 Oct 2001 16:58:21 -0700 To: Harti Brandt From: Mark Peek Subject: Re: arp: is using my IP address 0.0.0.0! ??!?!? Cc: , Jonathan Lemon Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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