- 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:
@@ -82,9 +82,9 @@ func NewServer(p DNSCreateParams) *Server {
|
||||
s.dnsFilter = p.DNSFilter
|
||||
s.stats = p.Stats
|
||||
s.queryLog = p.QueryLog
|
||||
s.dhcpServer = p.DHCPServer
|
||||
|
||||
if s.dhcpServer != nil {
|
||||
if p.DHCPServer != nil {
|
||||
s.dhcpServer = p.DHCPServer
|
||||
s.dhcpServer.SetOnLeaseChanged(s.onDHCPLeaseChanged)
|
||||
s.onDHCPLeaseChanged(dhcpd.LeaseChangedAdded)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user