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

Re: Integrating klibc's ipconfig into netcfg



On Sun, May 14, 2006 at 11:00:59PM +0200, Geert Stappers wrote:
> 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.
 
Yup, I figured it wasn't something that happened all the time.
 
> >  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.

I think that getting it to set random options is going to be a big ask, it's
too lightweight for that. Might be back to the drawing board...

Does that mean the that cases there are largely irrelevant? I mean pump
doesn't appear to support setting that vendor-class-identifier option...

regards

Andrew



Reply to: