udhcpc: limit renew/rebind timeout

Vladislav Grishenko themiron at mail.ru
Wed Sep 14 11:34:33 UTC 2011


Sorry, server has eaten the first email text.

Hello,
In some cases it's good to have control over manual renew/rebind timeout
before deconfig state.
Scenario:
1. udhcpc gets lease for 86400 secs and sleeps for 43200 before renew
attempt
2. PC gets physically disconnected and connected to another network
3. some phy control software sends SIGUSR1 to renew the lease, SIGUSR2 isn't
used because newly connected network could be the same as before
4. udhcpc sends unicast renew requests up to 60 timeout, which are ignored
by new network dhcp servers
5. udhcpc sends broadcast rebind requests, which could be naked or ignored
too, if there's no authority dhcp servers configured
6. udhcpc deconfigs and starting from discover state, gets new lease for the
new network
So, pt.4+5 it could take up to 86400 secs without correct lease, which is
too long and not acceptable in my case.
Second SIGUSR1 will immediately run into deconfig/discover state, which is
not preferable in case of the same subnet replugged.

With the patch, it's possible to limit pt.4 and pt.5 stage timeouts, for
example:
By specifying -N61 option udhcpc will make one  unicast renew attempt
(timeout greater than 60) and will get 61/2 timeout for broadcast rebind, if
original timeout before signal is greater than 61 sec.
By specifying -N60 and lower, no unicast renew attempt will be made, only
broadcast rebind.
Default behavior - is to continue use of unchanged timeouts, like before
patch.

Best Regards, theMIROn
ICQ: 303357
MSN: themiron at mail.ru
Skype: the.miron

> -----Original Message-----
> From: busybox-bounces at busybox.net [mailto:busybox-
> bounces at busybox.net] On Behalf Of Vladislav Grishenko
> Sent: Wednesday, September 14, 2011 5:30 PM
> To: busybox at busybox.net
> Cc: 'Leonid Lisovskiy'
> Subject: udhcpc: limit renew/rebind timeout
> 
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dhcpc-renew-timeout.patch
Type: application/octet-stream
Size: 3591 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20110914/bfa13844/attachment-0001.obj>


More information about the busybox mailing list