* dhcp: fail on startup if couldn't initialize DHCP module

This commit is contained in:
Simon Zolin
2020-08-04 14:18:35 +03:00
parent a3317c08c4
commit 89c3926ba5
2 changed files with 8 additions and 0 deletions

View File

@@ -221,6 +221,9 @@ func run(args options) {
config.DHCP.ConfigModified = onConfigModified
if runtime.GOOS != "windows" {
Context.dhcpServer = dhcpd.Create(config.DHCP)
if Context.dhcpServer == nil {
log.Fatalf("Can't initialize DHCP module")
}
}
Context.autoHosts.Init("")