OpenWrt Forum Archive

Topic: udhcpc is bugged

The content of this topic has been archived on 9 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi all!
Recently because of the 600 seconds lease time from my ISP, I've found out an ugly bug in udhcpc. Each time the IP is about to renew, the wan interface is deconfigurated and then configurated again with the IP he got from the ISP. This happens even if the IP is the same.
This constant deconfigurations of the wan interface, causes disconnects. nbd developer tried to make a fix for dhcpc, but it was not enough.
I'm also trying to fix this just by changing the code in the /usr/share/udhcpc/default.script but as I'm not sure I'll be able to do it, I would kindly ask a developer if he could try to get a fix to this.

Thanks a lot for your time.

And, if you watch file /var/state/network, its size keeps growing because it's filled with repetitive entries of ipaddr, netmask, dnsdomain, dns, gateway, up....

At least, do you like to submit a bug to track the problem? wink

Well I believe i have solved the first problem. I'll post my changes, if I'm sure I did not affect other things.
Also could you please paste me here the contents of your file /tmp/state/network?

Any news?

/var/state/network has more than 200k already.

The following lines are repeating:

config_set 'wan' 'ipaddr' '91.89.xyz.abc'
config_set 'wan' 'netmask' '255.255.252.0'
config_set 'wan' 'dnsdomain' ''
config_set 'wan' 'dns' '85.216.127.130 82.212.63.118'
config_set 'wan' 'gateway' '91.89.xyz.abc'
config_set 'wan' 'up' '1'

edit: Ticket #3022

(Last edited by iqt on 13 Jan 2008, 10:20)

The discussion might have continued from here.