- DHCP: fix crash after adding static lease which replaces the dynamic one
This commit is contained in:
parent
719ef16b93
commit
06af130bb7
@ -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…
Reference in New Issue
Block a user