+ dhcp: /dhcp/status: return static leases

This commit is contained in:
Simon Zolin
2019-05-14 13:54:35 +03:00
parent 342699d933
commit 763b986955
3 changed files with 26 additions and 3 deletions

View File

@@ -55,7 +55,9 @@ func (s *Server) dbLoad() {
numLeases := len(obj)
for i := range obj {
if !ipInRange(s.leaseStart, s.leaseStop, obj[i].IP) {
if obj[i].Expiry != leaseExpireStatic &&
!ipInRange(s.leaseStart, s.leaseStop, obj[i].IP) {
log.Tracef("Skipping a lease with IP %s: not within current IP range", obj[i].IP)
continue
}