[PATCH] udhcp: infinite retries

Bernhard Fischer rep.dot.nop at gmail.com
Tue Feb 6 09:55:54 UTC 2007


On Tue, Feb 06, 2007 at 10:36:12AM +0100, Samuel Ortiz wrote:
>Hi Denis,
>
>Denis Vlasenko wrote:
>> On Monday 05 February 2007 17:33, Samuel Ortiz wrote:
>>> Hi All,
>>>
>>> It may be useful (at least it is for us) to keep on sending DHCP request 
>>> and renewals for ever until we actually get an answer. For that purpose 
>>> udhcpc -t 0 could do the job.
>> 
>> I guess udhcpc -t 999999999 will be the same in practice.
>
>Almost, but not exactly.
>We have machines that can be powered up without being connected to any 
>network for weeks. However, we need them to fetch an IP if they ever get 
>plugged to some network.
>
>
>>> Attached you will find the corresponding patch, please let me know if 
>>> you'd consider it for inclusion.
>> 
>> Well, and if for some obscure reason someone wants zero retries?
>
>0 retries would be one try, and that would be -t 1.
>With the current code, running udhcpc with -t 0 is quite useless since 
>it will not send _any_ DHCP frame since packet_num will never be lower
>than client_config.retries. I don't see the point of doing that unless 
>you're expecting a DHCP offer or ACK without having sent a discovery or 
>request previously.
>That's why I assumed -t 0 was semantically available, and proposed to 
>use it for infinite retries.

I think that the proposal to provide means to infinitely query makes
sense. Can zcip take care of this even now, perhaps?



More information about the busybox mailing list