Re: [PATCH] ISC dhcpd siaddr (next-server) zero default change in 3.0.2

Marty Connor <[email protected]> Wed, 14 Sep 2005 10:14:36 -0400
Newsgroups gmane.network.etherboot.user,gmane.network.dhcp.isc.dhcp-server,gmane.network.etherboot.devel
Message-ID <[email protected]>
On Sep 14, 2005, at 8:36 AM, Harald Welte wrote:
> Hi!
> I spent the last three hours debugging a problem where suddenly a  
> number
> of my diskless embedded systems refused to boot.  Those systems are
> based on etherboot (http://www.etherboot.org/).
> After adding tons of debug statements to the etherboot code, I  
> found out
> that

Herald,

Many thanks for your debugging.  We were recently made aware of the  
problem:

     http://sourceforge.net/mailarchive/forum.php? 
thread_id=8122799&forum_id=6401

It certainly is something we need to address.

> 1) Etherboot DHCP client code ignores a DHCPOFFER with "siaddr"  
> 0.0.0.0
> 2) dhcp-3.0.2 suddenly changed the default from the dhcp server  
> address
>    to 0.0.0.0.  This is mentioned in the changelog, but is  
> contradicted
>    by the dhcpd.conf.5 manpage (which still states that the DHCP  
> server
>    address is used as default).
> I don't really understand the reasoning of the change in  
> dhcp-3.0.2.  I
> think it will cause many similar setups to break, and if admins look
> into the dhcpd.conf.5, they verify that their setup is correct  
> according
> to the documentation - but it ceases to work after a isc dhcp upgrade.
> Please find the patch below for dhcpd.conf.5

Perhaps someone on the [email protected] list will have something  
to say about the reasoning behind this.  If I was to venture a guess,  
I would guess that it has something to do with interoperability with  
other DHCP server implementations.

> If you still want to continue the semantic change of the default  
> value,
> I strongly suggest to print a warning or even make server startup  
> fail,
> if
> A) any netbooting related directive (root-path, filename, ...) is used
>     _AND_
> B) no "next-server" directive is present in the configuration.
> This way the admin at least knows that something is wrong and has  
> to be
> changed.

Documentation is often the hardest thing to keep up to date.  It's  
good you mentioned this.

> For the etherboot folks: I've attached a suggested patch that prints a
> message if a zero siaddr dhcpoffer is ignored.  The current silent
> failiure makes debugging hard.

The Etherboot patch looks fine at first glance.  I think the wording  
should be a little more general, something like:

+        printf("Ignoring DHCP offer without valid 'siaddr' field,\n "
+               "DHCP config may require explicit 'next-server'  
declaration.\n");

instead of:

+        printf("ignoring DHCP offer without valid 'siaddr' field, on "
+               "ISC dhcpd >= 3.0.2 use 'next-server' configuration\n");

This would make the condition more general, in case other servers do  
this as well.


> Thanks for your consideration,
> -- 
> - Harald Welte <[email protected]>                      http:// 
> gnumonks.org/
> <dhcpd-3.0.3-manpage-siaddr.patch>
> <etherboot-5.4.1-dhcp-zero-siaddr-warning.patch>

Thank you for your debugging and patch.

Let's see what other folks think.

Marty

-- 
     Try: http://rom-o-matic.net/ to make Etherboot images instantly.

    Name: Marty Connor
US Mail: Entity Cyber, Inc.; P.O. Box 391827;
          Cambridge, MA 02139; USA
   Voice: (617) 491-6935; Fax: (617) 491-7046
   Email: [email protected]
     Web: http://www.etherboot.org/




-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php