Skip to content

maintain_dhcp_lease() Always triggers lease renewal #168

Closed
@Jahor

Description

@Jahor

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions