[Bug 13776] New: udhcpc allows short lease to expire

bugzilla at busybox.net bugzilla at busybox.net
Thu Apr 29 20:05:53 UTC 2021


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

            Bug ID: 13776
           Summary: udhcpc allows short lease to expire
           Product: Busybox
           Version: 1.33.x
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Networking
          Assignee: unassigned at busybox.net
          Reporter: sinbad_4273 at yahoo.com
                CC: busybox-cvs at busybox.net
  Target Milestone: ---

The 2 lines below pretend that the lease is 122s when it is in fact shorter.
The udhcp_run_script() informs the client of the actual lease time not the make
believe one.

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

A modem that gives out a temporary IP address with a 60s lease time to dd-wrt
will see the lease time reach zero. Busybox dhcpc.c will only attempt to renew
after half the 122s make believe lease time (61s) which is after the actual
lease time (60s) has already expired.

The fudging of tiny lease times first appeared here enforcing a 10s minimum:
"udhcpc: guard against zero lease time"

https://git.busybox.net/busybox/commit/networking/udhcp/dhcpc.c?id=fc9e1080320e52fb97ae694627d8101af64f3dad

It then became 16s here:
"udhcpc: code shrink"

https://git.busybox.net/busybox/commit/networking/udhcp/dhcpc.c?id=0fd4347cedd1d32341e827c04dd36aaaf2e8040d

Lastly a large jump to enforcing a 122s minimum:

"udhcpc: ensure at least one unicast renew attempt"

https://git.busybox.net/busybox/commit/networking/udhcp/dhcpc.c?id=c05aa6a776ab2420a42c041a3b5d45db587fd9ef

After the expired lease, unpredictable connection failures occur between my
modem and router.

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


More information about the busybox-cvs mailing list