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

Olaf Hering olh at suse.de
Thu Aug 19 14:56:43 PDT 2004

 On Thu, Aug 19, Olaf Hering wrote:

> Another bug is the broadcast handling, the broadcast address is not
> setup correctly. I dont have a patch for it right now, but I will try to
> provide a fix.

The reason for the broken broadcast handling is the missing assignment
of the provided netmask. As a result, the class netmask from
inet_class_netmask() is used.
This will fail, netmask becomes /8

ipconfig -c none

Patch applies to the previous sysfs patch.

--- klibc-0.161-olh/ipconfig/main.c	2004-08-19 10:55:59.000000000 +0200
+++ klibc-0.161-olh/ipconfig/main.c	2004-08-19 13:19:06.000000000 +0200
@@ -523,6 +526,8 @@ static void bringup_one_dev(struct netde
 			dev->ip_server = template->ip_server;
 		if (template->ip_gateway != INADDR_NONE)
 			dev->ip_gateway = template->ip_gateway;
+		if (template->ip_netmask != INADDR_NONE)
+			dev->ip_netmask = template->ip_netmask;
 		if (template->ip_nameserver[0] != INADDR_NONE)
 			dev->ip_nameserver[0] = template->ip_nameserver[0];
 		if (template->ip_nameserver[1] != INADDR_NONE)

USB is for mice, FireWire is for men!


More information about the klibc mailing list