mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-03-14 22:48:35 +03:00
Don't try to start DHCP server if it's not enabled.
This commit is contained in:
parent
55a7ff7447
commit
7ab03e9335
1 changed files with 4 additions and 0 deletions
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…
Add table
Reference in a new issue