Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Apr 2000 01:12:15 +0100 (BST)
From:      Andrew Gordon <arg@arg1.demon.co.uk>
To:        David Holloway <davidhol@windriver.com>
Cc:        "Rodney W. Grimes" <freebsd@gndrsh.dnsmgr.net>, current@freebsd.org
Subject:   Re: Overwhelming messages from /sys/netinet/if_ether.c 
Message-ID:  <Pine.BSF.4.21.0004072318100.26224-100000@server.arg.sj.co.uk>
In-Reply-To: <200004071942.MAA01133@papermill.wrs.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Fri, 7 Apr 2000, David Holloway wrote:

> I say with 99% certainty that assigning 0.0.0.0 to
> the interface is a requirement of dhcp.
> 
> You can't stop using it and expect dhcp to work.

Yes, RFC2131 clause 4.1 says:

   DHCP messages broadcast by a client prior to that client obtaining
   its IP address must have the source address field in the IP header
   set to 0.

RFC951 clause 7.1 says the same thing for BOOTP (though BOOTP and DHCP are
really the same protocol).


However, this isn't really an excuse for issuing ARP with a source address
of zero: the initial DHCP exchange is done with broadcasts (so doesn't
need ARP), and after that the address is known.  The problem presumably
arises due to other traffic trying to go out while DHCP is still
configuring the interface.  This is analgous to the situation with PPP and
dynamic assignment - and there isn't an easy solution because by the time
you have a packet in your hand it is much too late to fix everything
(you've probably got a socket bound to the bogus address, for example).


On Fri, 7 Apr 2000, Rodney W. Grimes wrote:
>
> Ahhh... then perhaps a better fix is to change the gratitious arp
> routine to _not_ emit the bogus arp who-has arp-i-am when an interface
> is ifconfig'ed to 0.0.0.0 rather than cause the error logging code to be
> disabled?

The fix you suggest appears to have been implemented long ago:

===================================================================
RCS file: /repository/src/sys/netinet/if_ether.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -r1.39 -r1.40
34c34
<  * $Id$
---
>  * $Id: if_ether.c,v 1.39 1997/02/22 09:41:24 peter Exp $
633,634c633,635
<     arprequest(ac, &(IA_SIN(ifa)->sin_addr.s_addr),
<                  &(IA_SIN(ifa)->sin_addr.s_addr), ac->ac_enaddr);
---
>     if (ntohl(IA_SIN(ifa)->sin_addr.s_addr) != INADDR_ANY)
>           arprequest(ac, &(IA_SIN(ifa)->sin_addr.s_addr),
>                        &(IA_SIN(ifa)->sin_addr.s_addr), ac->ac_enaddr);


It is still appropriate to fix the error logging code: saying "xxx is
using the same address as me" when the address in question is 0.0.0.0 is
not useful: this _isn't_ a general catch for people ARP-ing for zero - it
only serves that purpose when the local machine is also mis-configured.



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?Pine.BSF.4.21.0004072318100.26224-100000>