udhcpc is disrespecting --retries, unless -n is passed as well

Michael D. Setzer II mikes at kuentos.guam.net
Tue Aug 6 10:08:17 UTC 2013


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.

-t defaults to 3
-T defult to 3 seconds. 

> 
> anyway: here's the proposed patch:
> 
> 


+----------------------------------------------------------+
  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        15624396.784372   |   EINSTEIN    12631615.299852
ROSETTA      8143657.871838   |   ABC         16207488.254205



More information about the busybox mailing list