[BusyBox] DHCP client patch

Joshua Jackson busybox at vortech.net
Wed Apr 14 04:34:59 UTC 2004


On Tuesday 13 April 2004 02:06, Russ Dill wrote:
> On Mon, 2004-04-12 at 15:04, Joshua Jackson wrote:
> > I submitted a version of this patch a while ago, but it must have gotten
> > overlooked... this is a cleaner implementation anyway.
>
> I wanted to know *why* you thought rearanging the order fixed things, I
> never got an answer.

Sorry, must have missed the question.

As to why I think it fixes it... testing, testing, and more testing.

From my testing it would appear that the case of select returning -1 with 
errno=EINTR is happening on my test systems before the signal shows up in the 
signal pipe. As the if statement does nothing in this case, the loop 
continues. As to why the state machine thinks it needs to issue a pile of 
renew's... dunno. I didn't look into it that deep.

My VMWare test machines and the production hardware both show a clean exit of 
the client with the supplied patch. I can repeat this over and over. 

Is there a reason not to move signal processing ahead of the test to see if it 
is time to issue more network traffic? Have you tested it locally and found 
that udhcpc does not issue the flood of renews?

I will give your implementation a whirl. Is there a reason to keep the empty 
if statement that tests for an error on select? I would think that this 
should be added to the signal tests anyway instead of forcing the client to 
wait for the signal to show up in the pipe tests.

It is possible that my patch is simply a kludge around a bigger problem in the 
state cycle. As I said, I haven't dug that deep.

> timeout is declared static, it does not need to be initialized.

Ok. Wasn't sure if the compiler zero'ed those or not.

Josh




More information about the busybox mailing list