lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #57481] Lease timeout timers overflow


From: S. Janek
Subject: [lwip-devel] [bug #57481] Lease timeout timers overflow
Date: Wed, 25 Dec 2019 22:17:52 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko

URL:
  <https://savannah.nongnu.org/bugs/?57481>

                 Summary: Lease timeout timers overflow
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: sjanek
            Submitted on: Thu 26 Dec 2019 03:17:50 AM UTC
                Category: DHCP
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: git head

    _______________________________________________________

Details:

Hi,

I am not sure if its bug but:
in function called dhcp_bind there is assignation of timeouts to variables
(defined in struct dhcp):
t0_timeout
t1_timeout
t2_timeout
which are 16 bits, form variable timeout of size 32 bits.


For lease time one day the timeout is 86400 this value is out of range 16 bits
variable. I have timeouts received from router as follow:
t0=86400
t1=43200
t2=75600
this cause variable overflow and results that condition:
  /* If we have sub 1 minute lease, t2 and t1 will kick in at the same time.
*/
  if ((dhcp->t1_timeout >= dhcp->t2_timeout) && (dhcp->t2_timeout > 0)) {
    dhcp->t1_timeout = 0;
  }
is true.

Is a bug?




    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?57481>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]