[BusyBox] (no subject)

Richard Kojedzinszky krichy at tvnetwork.hu
Thu Jan 22 21:38:14 UTC 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dear Busybox List,

I am using udhcpc, and I was suprised when it crashed, or did nothing
in 'bound' state. As it didn't execute the helper script. The reason why I
looked after it was that before that day it
worked, and i hadn't change udhcpc, i still use the busybox-1.00-pre5
package. And then I remembered, that I changed is I added a boot-filename
option to my dhcp server (isc). Then I started to read the code, and found
that, when exporting the dhcp options to the environment for the helper
script, the cardinality of them were determined wrong. I don't know if I
found the real bug, but what I fixed has solved my problem. The patch is
attached.

Kojedzinszky Richard
TvNetWork Rt.
E-mail: krichy at tvnetwork.hu
PGP: 0x24E79141
  Fingerprint = 6847 ECFF EF58 0C09 18A5  16CF 270F 0C6F 24E7 9141
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Made with pgp4pine 1.75-6

iD8DBQFAEELJJw8MbyTnkUERAtQxAJ48WXZiKLOJOjIg48xZZH6sAHKK7ACdGTTe
5u5RdlxjQwx19fi7ENz9Zp4=
=7Ssk
-----END PGP SIGNATURE-----
-------------- next part --------------
--- busybox-1.00-pre5/networking/udhcp/script.c	Thu Dec 18 23:25:38 2003
+++ busybox-1.00-pre5-p/networking/udhcp/script.c	Thu Jan 22 22:20:18 2004
@@ -145,9 +145,12 @@
 	if (packet == NULL)
 		num_options = 0;
 	else {
-		for (i = 0; dhcp_options[i].code; i++)
+		for (i = 0; dhcp_options[i].code; i++) {
 			if (get_option(packet, dhcp_options[i].code))
 				num_options++;
+			if (dhcp_options[i].code == DHCP_SUBNET)
+				num_options++;
+		}
 		if (packet->siaddr) num_options++;
 		if ((temp = get_option(packet, DHCP_OPTION_OVER)))
 			over = *temp;


More information about the busybox mailing list