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

Submitter:  Vincent SELOSSE <vincent_netatmo>
Submitted:  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

Mon 20 Jun 2022 03:30:55 PM UTC, comment #3: 

Hey together,
i have exactly the same issue. My TENDA router assigns me a lease time of 30s. As lwIP is dividing this by DHCP_COARSE_TIMER_SECS (which is 60), it assigns to all timeout the value 1.

- `t0_timeout` = 1
- `t1_timeout` = 1
- `t2_timeout` = 1

This results in the function dhcp_coarse_tmr(void), to enter always
- dhcp_release_and_stop(netif);
- dhcp_start(netif);

So I get a new ip and all connections are getting closes. Is there a way to prevent this?

Eric Sawade <ericadamhall>
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>
Group 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>

 

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

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by ericadamhall (Posted a comment)
  • -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.

     

    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.14-f13d.
    Corresponding source code