[klibc] problems with ipconfig command (static config without
interface configures "lo")
Olaf Hering
olh at suse.de
Tue Aug 31 21:37:35 PDT 2004
On Sun, Aug 29, H. Peter Anvin wrote:
> Dirk von Suchodoletz wrote:
> >Hi!! I just downloaded and tested the most recent version of klibc (170)
> >... The problem of wrong interface configuration persists. If I do not
> >specify "ipconfig -c none $ip::eth0" ("::eth0" is needed for the ip=
> >commandline entry made by PXElinux or ":eth0" for etherboot) the loopback
> >interface is taken - which is not the optimal choice for LAN :-))
> >
> >Any hints or should I stick to the line mentioned above and count the ":"
> >for proper choice of line for either PXE or etherboot?
>
> I haven't had time to fix it just yet.
The patch I sent earlier will fix it.
Another bug is the required PROTO in ipconfig. Why does it default to
dhcp?
static unsigned int default_caps = CAP_DHCP | CAP_BOOTP | CAP_RARP;
this should be enough to get the interface up:
ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>
not 'ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:::none' like it is
now. Even 'ip=<client-ip>' should be enough, but parse_device() would
not like it:
if (strchr(ip, ':') == NULL) {
dev->name = ip;
goto done;
}
how about this patch?
It should fix 'ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>'
diff -purNx linux klibc1.170/ipconfig/main.c klibc-0.170.ipconfig/ipconfig/main.c
--- klibc-0.170/ipconfig/main.c 2004-08-19 18:19:42.000000000 +0200
+++ klibc-0.170.ipconfig/ipconfig/main.c 2004-08-31 20:32:57.945353784 +0200
@@ -474,6 +474,7 @@ static int parse_device(struct netdev *d
switch (opt) {
case 0:
parse_addr(&dev->ip_addr, ip);
+ dev->caps = 0;
break;
case 1:
parse_addr(&dev->ip_server, ip);
@@ -612,10 +613,11 @@ static int add_all_devices(struct netdev
logic the in-kernel ipconfig uses... */
if ( !(flags & IFF_LOOPBACK) &&
(flags & (IFF_BROADCAST|IFF_POINTOPOINT)) )
- continue;
+ {
if ((dev = add_device(de->d_name)) == NULL)
continue;
bringup_one_dev(template, dev);
+ }
}
closedir(d);
return 1;
--
USB is for mice, FireWire is for men!
sUse lINUX ag, nÜRNBERG
More information about the klibc
mailing list