dhcpsvc: fix lease expiry logic
Some checks are pending
build / test (macOS-latest) (push) Waiting to run
build / test (ubuntu-latest) (push) Waiting to run
build / test (windows-latest) (push) Waiting to run
build / build-release (push) Blocked by required conditions
build / notify (push) Blocked by required conditions
lint / go-lint (push) Waiting to run
lint / eslint (push) Waiting to run
lint / notify (push) Blocked by required conditions

This commit is contained in:
Eugene Burkov 2026-06-16 17:28:05 +03:00
parent 84cb6fde32
commit 763b23a37b

View file

@ -544,7 +544,8 @@ func (iface *dhcpInterfaceV6) commit(
lease.Hostname = aghnet.GenerateHostname(lease.IP)
}
if lease.Expiry.After(iface.clock.Now()) {
// TODO(e.burkov): Add the Lease.isExpired. method.
if lease.Expiry.Before(iface.clock.Now()) {
lease.updateExpiry(iface.clock, iface.common.leaseTTL)
}