Don't try to start DHCP server if it's not enabled.
This commit is contained in:
parent
55a7ff7447
commit
7ab03e9335
4
dhcp.go
4
dhcp.go
|
@ -137,6 +137,10 @@ func handleDHCPFindActiveServer(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
func startDHCPServer() error {
|
||||
if config.DHCP.Enabled == false {
|
||||
// not enabled, don't do anything
|
||||
return nil
|
||||
}
|
||||
err := dhcpServer.Start(&config.DHCP)
|
||||
if err != nil {
|
||||
return errorx.Decorate(err, "Couldn't start DHCP server")
|
||||
|
|
Loading…
Reference in New Issue