[klibc] problems with ipconfig command (no static config possible)

H. Peter Anvin hpa at zytor.com
Thu Aug 19 09:45:50 PDT 2004

Olaf Hering wrote:
> 2.6 has a broken SIOCGIFCONF ioctl, it does only return interfaces in UP
> state. So the eth0 is not seen by ipconfig, and your ip= line contains
> no interface. As a result, no config happens if the interface data are
> specified manually.
> this simple patch uses sysfs to find the available interfaces, it adds
> only ethernet links.

I don't think that's a good idea; after all, there *are* other 
legitimate boot targets (FDDI seems to have its own ARPHDR constant 
which is weird since it uses IEEE MAC addresses, but there is at least 
Arcnet and EUI64.)

The logic the kernel uses is the following:

                     (!(dev->flags & IFF_LOOPBACK) &&
                      (dev->flags & (IFF_POINTOPOINT|IFF_BROADCAST)) &&
                      strncmp(dev->name, "dummy", 5))) {

The logic for the dummy device especially is kind of ugly but probably 
unavoidable; the dummy device is largely by design hard to distinguish 
from a real interface.

Of course, if we do try to boot from it all that will happen is that 
we'll have wasted a few seconds.



More information about the klibc mailing list