Hi Denys, >> The option DHCP_ROUTER looks like has been commented out in >> networking/udhcp/common.h. >> If the option has been comment out, how could the code in dhcpc.c >> parse the packet >> and expose it to environment variables? > > Look at dhcp_optflags[] and dhcp_option_strings[] in > networking/udhcp/common.c
Thanks for your help. I've understand that the problem is not related to udhcpc. After I've printed the routing control command as debug message. I've found that when using ifconfig to set the netmask of NIC as 255.255.255.255 won't create an entry in routing table. That's why configure the default gateway will fail. I don't remembered set the nemask as 255.255.255.255 to a NIC with ifconfig won't create an entry in routing table. At least 3G networks works very well. The dhclient won't have a problem on this situation. Should we fix the udcpc/default.script to cover this kinde of situation? The following log is the debug dump of udhcpc/default.script on ubuntu 11.11. /home/macpaul/vmax# udhcpc -i wimax0 -q udhcpc (v1.18.4) started Sending discover... Sending select for 111.67.56.236... Lease of 111.67.56.236 obtained, lease time 3600 /sbin/ifconfig wimax0 111.67.56.236 netmask 255.255.255.255 /usr/share/udhcpc/default.script: Resetting default routes while /sbin/route del default gw 0.0.0.0 dev wimax0; do :; done SIOCDELRT: no such process /sbin/route add default gw 111.67.48.1 dev wimax0 metric 0 SIOCADDRT: no such process /usr/share/udhcpc/default.script: Adding DNS 111.67.54.11 /usr/share/udhcpc/default.script: Adding DNS 111.67.54.12 I'll post the log of udhcpc in busybox later. -- Best regards, Macpaul Lin _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
