[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Integrating klibc's ipconfig into netcfg



On Mon, May 15, 2006 at 03:33:08AM +1000, Andrew Pollock wrote:
> Hello,
> 
> I've been meaning to do this for probably a year, but I've finally gotten
> around to actually looking into what is involved in using ipconfig in netcfg
> as a replacement to dhcp-client, so we can get rid of DHCPv2 altogether.
> 
> The first observation I've made is that it doesn't appear to pass the
> hostname in the request.

In dhcp.c is this code snippet:

|     case DHCLIENT:
|       /* First, set up dhclient.conf */
|
|       if ((dc = file_open(DHCLIENT_CONF, "w")))
|       {
|         fprintf(dc, "send dhcp-class-identifier \"d-i\";\n" );
|         if (dhostname)
|         {
|           fprintf(dc, "send host-name \"%s\";\n", dhostname);
|         }
|         fclose(dc);
|       }

So only when dhostname is set, it sends the hostname in the request.


>  I'm attempting to clarify this with the author at the moment,
> but if someone with more C-fu than myself wants to take a look,
> I'd appreciate it.

I hope the above text did help.


> If indeed this is the case, is this a show stopper? I recall some bugs filed
> in the past from people trying to install on a cable connection where the
> cable provider required the hostname in order to issue a lease, so I'm
> assuming it is.

Beside sending the hostname for cable providers,
there is also the need to send dhcp-class-identifier "d-i",
to allow DHCP preseeding.


> regards
> 
> Andrew

Cheers
Geert Stappers



Reply to: