* dhcp: fail on startup if couldn't initialize DHCP module
This commit is contained in:
@@ -119,6 +119,11 @@ func Create(config ServerConfig) *Server {
|
||||
return nil
|
||||
}
|
||||
|
||||
if s.conf.Enabled && !v4conf.Enabled && !v6conf.Enabled {
|
||||
log.Error("Can't enable DHCP server because neither DHCPv4 nor DHCPv6 servers are configured")
|
||||
return nil
|
||||
}
|
||||
|
||||
// we can't delay database loading until DHCP server is started,
|
||||
// because we need static leases functionality available beforehand
|
||||
s.dbLoad()
|
||||
|
||||
Reference in New Issue
Block a user