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

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

Simon,

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.

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:

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

 

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
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    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.7