udhcpc hickups (was: udhcpc: Segmentation fault or SIGSEGV)

Cristian Ionescu-Idbohrn cristian.ionescu-idbohrn at axis.com
Fri Sep 23 19:34:59 UTC 2005


Gyorgy Farkas wrote:

> > In ffw 2.9.x the default setting of the DHCP client is: "udhcpc -n ..."
> > (-n   Exit with failure if lease cannot be immediately negotiated.)
>
> > I've tried to run it without "-n" option, respectively with "-b" option.
> > (-b   Fork to background if lease cannot be immediately negotiated.)
>
>
> It seems those "Segmentation fault"-s (or SIGSEGV-s) are caused by
> these lines of udhcpcrenew.sh:
>
>   eval `ipcalc --network $ip $subnet`
>   eval `ipcalc --broadcast $ip $subnet`

I had an unplesant experience helping a friend setting up ffw, with a
swidish ISP (comhem.se) :(  It showed up (my assumption) the named ISP is
(unsurpisly) heavily overbooking its ip-address pool.  It took some
20-retries to get a dhcp-reply.

The ffw default.script is using ipcalc (good thing) to deduce some stuff,
which many ISPs don't seem to care off :(

ipcalc doesn't seem to be able to cope with empty $ip and/or $subnet
values.  That's bad and, surprisingly, although repeatedly discussed,
noone seems to have bothered reporting the bug? (or I'm unable to find
one) :( If it's a 'feature', the problem may be the script is unable to
handle it.

Obviously, users need to get that blasted ip-address in order to 'get
hooked'.  I suggest, therefore, putting some more intelligense into that
script, to get around this bug.

Start udhcpc with option '-b' instead of '-n' to keep trying getting that
blasted ip.

If any of the $ip or $subnet are missing, just exit, and keep trying to
get an ip.


Cheers,
Cristian



More information about the busybox mailing list