[PATCH] udhcpc: give up on repeated errors
Peter Korsgaard
jacmet at uclibc.org
Tue May 20 22:55:17 UTC 2008
>>>>> "Denys" == Denys Vlasenko <vda.linux at googlemail.com> writes:
Hi,
Denys> On Tuesday 20 May 2008 13:51, Peter Korsgaard wrote:
>> From: Peter Korsgaard <jacmet at sunsite.dk>
>>
>> udhcpc never time out if errors occur (E.G. if the network
>> interface didn't detect a link), as the file descriptor keeps
>> on being readable with the error condition (E.G. -ENETDOWN).
>>
>> Add a max_errors and give up if it is exceeded.
Denys> I as an admin often configure dhcp to run forever (until stopped
Denys> by external means (SIGTERM)).
Denys> Do I understand you correctly that the problem here is not that udhcpc
Denys> loops here, but that it loops very fast (i.e. there is no delay)?
Well, that's a potential issue as well - but I basically just don't
want it to hang the boot sequence. I would prefer if it behaved like
it does when it doesn't get any replies to the discover (quit or going
into background depending on config).
I use ifup/down and the startup script does an ifup -a (Yes, I know
you don't like ifup, but yeah ..).
Denys> Will it be an acceptable solution if we will just add a sleep(N)
Denys> here:
That still doesn't make it time out, so no.
--
Bye, Peter Korsgaard
More information about the busybox
mailing list