From 480c6ac753fc7e3faae44275ce63f2fc448e0345 Mon Sep 17 00:00:00 2001 From: Simon Zolin Date: Fri, 13 Mar 2020 17:30:09 +0300 Subject: [PATCH] Merge: - dhcp: crash on error on startup Squashed commit of the following: commit 81908b636ec91a562b3ff8634b77c71dc3f009e4 Author: Simon Zolin Date: Fri Mar 13 17:25:36 2020 +0300 - dhcp: crash on error on startup --- home/home.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/home/home.go b/home/home.go index f7c697f6..2fd5d378 100644 --- a/home/home.go +++ b/home/home.go @@ -192,6 +192,9 @@ func run(args options) { config.DHCP.HTTPRegister = httpRegister config.DHCP.ConfigModified = onConfigModified Context.dhcpServer = dhcpd.Create(config.DHCP) + if Context.dhcpServer == nil { + os.Exit(1) + } Context.clients.Init(config.Clients, Context.dhcpServer) config.Clients = nil