[PATCH] udhcpc: give up on repeated errors

Alexander Griesser alexander.griesser at lkh-vil.or.at
Tue May 20 13:39:51 UTC 2008


Paul Fox wrote:
>  > Add a max_errors and give up if it is exceeded.
> 
> if this behavior is desirable, i think it should be made
> conditional, and, in my opinion, it should be made conditional in
> a way that preserves current behavior by default.  i suspect
> there should probably be a delay before we continue looping.

As far as I can tell (and have tested on many systems here), the default
behaviour is broken and does not need to be retained, although the
solution to simply quit if an error occurs is not very beautiful anyway.

Some of my systems have buggy hardware in it where the network link goes
up very late, so f.ex. if udhcpc is started before the link is up, it
will _NEVER_ obtain a lease, because udhcp doesn't recognize the link
state change.

Currently I'm passing arguments to udhcpc to try to immediately obtain
a lease and if it fails, udhcpc quits and my init scripts restart udhcpc
to try again (-n parameter). Combined with manual timeout settings (-t 1
-T 1 -A 1) this solution works very well, although it's merely a workaround.

ciao,
-- 
Alexander Griesser (Netzwerkadministration)
E-Mail: alexander.griesser at lkh-vil.or.at | Web: http://www.lkh-vil.or.at
KABEG LKH Villach | Nikolaigasse 43 | 9500 Villach
Tel.:   +43 4242 208 3061 | Fax.:   +43 4242 971 3061



More information about the busybox mailing list