- windows: install: fix crash due to empty DHCP server pointer
#2036 Squashed commit of the following: commit 5c70d28b241d1a98e034f6798dade073b1b42511 Author: Simon Zolin <s.zolin@adguard.com> Date: Mon Aug 24 18:42:21 2020 +0300 - windows: install: fix crash due to empty DHCP server pointer We should not assign a Go interface value, otherwise `==nil` check doesn't work.
This commit is contained in:
10
home/dns.go
10
home/dns.go
@@ -62,10 +62,12 @@ func initDNSServer() error {
|
||||
Context.dnsFilter = dnsfilter.New(&filterConf, nil)
|
||||
|
||||
p := dnsforward.DNSCreateParams{
|
||||
DNSFilter: Context.dnsFilter,
|
||||
Stats: Context.stats,
|
||||
QueryLog: Context.queryLog,
|
||||
DHCPServer: Context.dhcpServer,
|
||||
DNSFilter: Context.dnsFilter,
|
||||
Stats: Context.stats,
|
||||
QueryLog: Context.queryLog,
|
||||
}
|
||||
if Context.dhcpServer != nil {
|
||||
p.DHCPServer = Context.dhcpServer
|
||||
}
|
||||
Context.dnsServer = dnsforward.NewServer(p)
|
||||
dnsConfig := generateServerConfig()
|
||||
|
||||
Reference in New Issue
Block a user