Pull request: all: do not check local domains when dhcp srv is off

Updates .

Squashed commit of the following:

commit 49d3ca5c9de0468ccb1792e9de263fd66e30d79c
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Thu Apr 29 15:35:32 2021 +0300

    all: do not check local domains when dhcp srv is off
This commit is contained in:
Ainar Garipov 2021-04-29 16:00:07 +03:00
parent c8092fe34d
commit a06543a1d5
6 changed files with 30 additions and 6 deletions
internal/home

View file

@ -184,6 +184,10 @@ func setupConfig(args options) {
Context.dhcpServer = dhcpd.Create(config.DHCP)
if Context.dhcpServer == nil {
// TODO(a.garipov): There are a lot of places in the code right
// now which assume that the DHCP server can be nil despite this
// condition. Inspect them and perhaps rewrite them to use
// Enabled() instead.
log.Fatalf("can't initialize dhcp module")
}