[Bug 13776] udhcpc allows short lease to expire

bugzilla at busybox.net bugzilla at busybox.net
Fri May 14 04:41:08 UTC 2021


https://bugs.busybox.net/show_bug.cgi?id=13776

Paul <sinbad_4273 at yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|FIXED                       |---
           Assignee|unassigned at busybox.net      |sinbad_4273 at yahoo.com
             Status|RESOLVED                    |REOPENED

--- Comment #7 from Paul <sinbad_4273 at yahoo.com> ---
Created attachment 8941
  --> https://bugs.busybox.net/attachment.cgi?id=8941&action=edit
log of new udhcpc code

Dropped the new udhcpc source code into my dd-wrt build. Makefile still says
v1.33.0 but the udhcpc code only is from master.

The new code now uses the 60s lease and renews it successfully after half that
(so every 30s) a few times (nice!)

Once the modem has a public IP address it no longer allows renewal of the
private IP address and the new code now only attempts to renew 3 times (nice!)

Unfortunately after the 3 failed renew attempts it starts broadcasting renew
attempts forever.

This line of code is always true so we are stuck:

https://git.busybox.net/busybox/tree/networking/udhcp/dhcpc.c#n1548

Before this code change we were checking if timeout was positive which
eventually became false which allowed us to reach the code below ie:

/* Timed out, enter init state */

I added a paul_* debug message printing lease_remaining any time it changes and
it starts at zero then always stays at 60. We no longer ever reach the /* Timed
out, enter init state */ code. Those lease_remaining log messages also print
the timeout variable in case that helps.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the busybox-cvs mailing list