You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling maintain_dhcp_lease() always starts renew process (before lease has expired).
In DHCP implementation Lease time, T1 and T2 used as if they are in milliseconds (with ticks_add and _start_ticks, which is in ms), but DHCP defines them in seconds, so they must be multiplied by 1000 when read from packet (lines 628, 634, 636).
On a side note, it looks rather confusing when _lease, _t1, _t2 are used both to store time period and time instant. It saves a few bytes, but does not help readability.
The text was updated successfully, but these errors were encountered:
Calling
maintain_dhcp_lease()
always starts renew process (before lease has expired).In DHCP implementation Lease time, T1 and T2 used as if they are in milliseconds (with ticks_add and _start_ticks, which is in ms), but DHCP defines them in seconds, so they must be multiplied by 1000 when read from packet (lines 628, 634, 636).
On a side note, it looks rather confusing when _lease, _t1, _t2 are used both to store time period and time instant. It saves a few bytes, but does not help readability.
The text was updated successfully, but these errors were encountered: