mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2026-07-01 13:21:51 +00:00
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
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:
parent
84cb6fde32
commit
763b23a37b
1 changed files with 2 additions and 1 deletions
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue