wgengine/netstack: include DNS.ExtraRecords in DNSMap

So SOCKS5 dialer can dial HTTPS cert names, for instance.

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
pull/2954/head
Brad Fitzpatrick 3 years ago
parent 56d8c2da34
commit 29a8fb45d3

@ -206,6 +206,16 @@ func DNSMapFromNetworkMap(nm *netmap.NetworkMap) DNSMap {
break
}
}
for _, rec := range nm.DNS.ExtraRecords {
if rec.Type != "" {
continue
}
ip, err := netaddr.ParseIP(rec.Value)
if err != nil {
continue
}
ret[strings.TrimRight(rec.Name, ".")] = ip
}
return ret
}

Loading…
Cancel
Save