mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-03-14 22:48:35 +03:00
- DHCP: fix crash after adding static lease which replaces the dynamic one
This commit is contained in:
parent
719ef16b93
commit
06af130bb7
2 changed files with 6 additions and 0 deletions
|
@ -146,6 +146,9 @@ func (s *v4Server) rmDynamicLease(lease Lease) error {
|
|||
}
|
||||
|
||||
s.leaseRemoveSwapByIndex(i)
|
||||
if i == len(s.leases) {
|
||||
break
|
||||
}
|
||||
l = s.leases[i]
|
||||
}
|
||||
|
||||
|
|
|
@ -134,6 +134,9 @@ func (s *v6Server) rmDynamicLease(lease Lease) error {
|
|||
}
|
||||
|
||||
s.leaseRemoveSwapByIndex(i)
|
||||
if i == len(s.leases) {
|
||||
break
|
||||
}
|
||||
l = s.leases[i]
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue