buglwIP - A Lightweight TCP/IP stack - Bugs: bug #60043, DHCP - lwip 2.1.2 - Manage the...


You are not allowed to post comments on this tracker with your current authentication level.

bug #60043: DHCP - lwip 2.1.2 - Manage the very low value for lease time

Submitted by:  Vincent SELOSSE <vincent_netatmo>
Submitted on:  Thu 11 Feb 2021 04:35:57 PM UTC
Category:  DHCP Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None
lwIP version:  * Other
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:
       No canned response available


Tue 09 Mar 2021 05:13:19 PM UTC, comment #2: 


Could you explicit the timer jitter problem?

`DHCP_COARSE_TIMER_SECS` could be configurable through opt.h header file.

What do you think about that?


Vincent SELOSSE <vincent_netatmo>
Fri 05 Mar 2021 08:51:11 AM UTC, comment #1: 

> My proposal is to change: DHCP_COARSE_TIMER_SECS = 1

No, that's not a good idea: it might increase timer jitter and increase battery usage on some systems.

Simon Goldschmidt <goldsimon>
Project Administrator
Thu 11 Feb 2021 04:35:57 PM UTC, original submission:  

In RFC 2131, it was specify that 4.3. The minimum lease time restriction has been removed. 

In fact if the lease time received = 60sec, the counter `tx_timeout` checked in `dhcp_coarse_tmr()` will take the following value: 

  • `t0_timeout` = 1
  • `t1_timeout` = 1
  • `t2_timeout` = 1

In `dhcp_coarse_tmr()` the `if (dhcp->t0_timeout && (++dhcp->lease_used == dhcp->t0_timeout))` will be always true. `dhcp_renew()` and `dhcp_rebind()` will be never called. 

My proposal is to change:

  • Change `tx_timeout` variable type from 16bits -> 32bits
Vincent SELOSSE <vincent_netatmo>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by vincent_netatmo (Submitted the item)
  • -email is unavailable- added by vincent_netatmo

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.





    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-02-11 vincent_netatmo Attached File- => Added 0001-lwip-2.1.2-Manage-the-lease-time-very-low-value.patch, #50855
    2021-02-11 vincent_netatmo Carbon-Copy- => Added -email is unavailable-

    Back to the top

    Powered by Savane 3.9