+ dhcp: test

This commit is contained in:
Simon Zolin
2019-03-01 20:03:22 +03:00
parent 08bf9b0acb
commit e164cff02b
2 changed files with 123 additions and 0 deletions

View File

@@ -368,3 +368,11 @@ func (s *Server) Leases() []*Lease {
s.RUnlock()
return result
}
// Reset internal state
func (s *Server) reset() {
s.Lock()
s.leases = nil
s.Unlock()
s.IPpool = make(map[[4]byte]net.HardwareAddr)
}