[klibc] ipconfig

Eric W. Biederman ebiederm at xmission.com
Fri May 13 05:53:12 PDT 2005

"H. Peter Anvin" <hpa at zytor.com> writes:

> I'm trying to get nfsroot via kinit to work, and I'm increasingly of the opinion
> that the ipconfig code unfortunately is in much worse shape than I thought.
> I've tried to clean it up quite a bit, but it's still rather messy.
> Anyway, one of the thing that I think is probably broken is the handling of
> "ip=dhcp" or anything else without a specified interface in the case of a
> machine with more than one interface (I happen to have one such.) ipconfig seems
> to treat this as "all", in the sense that it won't give up until it has
> configured each and every interface.  This is, well, problematic if one of them
> isn't plugged in, for example.
> It seems that the kernel doesn't behave this way.  I'm inclined to change it so
> that this, in effect, means "any"; meaning once one interface is configured then
> let that be it.
> Thoughts?

Sounds about right....

However it is simple to test if an interface plugged in,
with the mii code, and we should do that.

My gut feel is that the code should continue to try on multiple
interfaces but stop once n (n = 1?) seconds have passed since
it received a reply, that the kernel can used.  This gives the
chance to pick the best DHCP reply, if you get several.  But
more importantly is the trying on all of the interfaces until
something happens.  Something stupid could have happened like
someone forgot to plug in the cable before turning on the
machine etc. 


More information about the klibc mailing list