udhcpc is disrespecting --retries, unless -n is passed as well
Michael D. Setzer II
mikes at kuentos.guam.net
Tue Aug 6 23:04:41 UTC 2013
On 6 Aug 2013 at 17:40, John Spencer wrote:
Date sent: Tue, 06 Aug 2013 17:40:47 +0200
From: John Spencer <maillist-busybox at barfooze.de>
To: "Michael D. Setzer II"
<mikes at kuentos.guam.net>
Copies to: busybox <busybox at busybox.net>
Subject: Re: udhcpc is disrespecting --retries, unless -n is
passed as well
> On 08/06/2013 12:08 PM, Michael D. Setzer II wrote:
> > On 6 Aug 2013 at 9:44, John Spencer wrote:
> >
> > Date sent: Tue, 06 Aug 2013 09:44:04 +0200
> > From: John Spencer<maillist-busybox at barfooze.de>
> > To: busybox<busybox at busybox.net>
> > Subject: udhcpc is disrespecting --retries, unless -n is passed as
> > well
> >
> >> udhpc is looping forever witout respecting the number of retries
> >> given. only passing -n makes it exit after the max number of
> >> retries.
> >>
> >> this is pretty counterintuitive. took me about 2 hours to track
> >> down this bug because all the funky CFLAGS and LDFLAGS used by BB
> >> even when doing a debug build make gdb behave very odd and the
> >> function has a huge loop with dozens of gotos and possible exits. i
> >> had to explore the buildlogs and rip out the commands executed to
> >> strip all those debug killer CFLAGS away.
> >
> > I use the udhcpcd -n -t 8 -T 5 -i $variablewithinterface -s
> > ./udhcpc.sh
> >
> > Originally, I just had the -n -i -s options, but had a user that
> > wasn't gettting the ip address on the initial boot process. Hoping
> > this additional options will make it more robust.
>
>
> now we have the opposite situation: a user (me) cannot even login to
> his machine because udhcpc spawned from init loops forever instead of
> exiting after 3 tries as it should. there is nothing at all that
> indicates wtf is happening there and why udhcpc is ignoring the passed
> option. the retries option help text does not explain that it only
> works in combination with -n.
>
> since the option "-t 0" (0 retries means indefinite retries) has been
> added recently (see commit 1c7a58dfb82ea04c525e0c19f94f2d800dee99e3 by
> openwrt folks), having the -n option seems redundant. so removing -n
> and adding a hint about the -t 0 switch instead seems like the best
> solution.
>
My understanding is that the udhcpc is set to run in a loop without
the -n because the IP is not permanent. You get the lease for a
fixed amount of time, and it has to be renewed occassionally, so
that is why it needs to continue to run.
+----------------------------------------------------------+
Michael D. Setzer II - Computer Science Instructor
Guam Community College Computer Center
mailto:mikes at kuentos.guam.net
mailto:msetzerii at gmail.com
http://www.guam.net/home/mikes
Guam - Where America's Day Begins
G4L Disk Imaging Project maintainer
http://sourceforge.net/projects/g4l/
+----------------------------------------------------------+
http://setiathome.berkeley.edu (Original)
Number of Seti Units Returned: 19,471
Processing time: 32 years, 290 days, 12 hours, 58 minutes
(Total Hours: 287,489)
BOINC at HOME CREDITS
SETI 15653098.362897 | EINSTEIN 12631615.299852
ROSETTA 8154112.026236 | ABC 16207622.111209
More information about the busybox
mailing list