toggling an identity that has an ip intercept causes panic

This commit is contained in:
dovholuknf
2020-11-03 10:11:21 -05:00
parent 1754c65e6f
commit d65aafea28
+5 -1
View File
@@ -229,8 +229,12 @@ func (dns *dnsImpl) ReturnToDns(hostname string) net.IP {
dnsEntry := dns.hostnameMap[normalizeDnsName(hostname)]
if dnsEntry != nil {
dnsEntry.dnsEnabled = true
return dnsEntry.ip
} else {
// probably is an ip - pasee as ip and try to return that
ip := net.ParseIP(hostname)
return ip
}
return dnsEntry.ip
}
func DnsInit(tun api.DesktopEdgeIface, ip string, maskBits int) {