[RFC][UDHCPC][Suggestion] Is there possible to enable option 03 (DHCP_ROUTER) in busybox?

Denys Vlasenko vda.linux at googlemail.com
Fri Nov 4 14:48:24 UTC 2011


On Fri, Nov 4, 2011 at 3:40 PM, 馬克泡 <macpaul at gmail.com> wrote:
> 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?

Your question should be directed to whoever maintains
/usr/share/udhcpc/default.script file on your machine / distribution.
It is not coming from busybox.


> 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

-- 
vda


More information about the busybox mailing list