net/dns: fix resolved match domains when no nameservers are provided.

Signed-off-by: David Anderson <danderson@tailscale.com>
pull/1749/head
David Anderson 4 years ago
parent 4be26b269f
commit 89c81c26c5

@ -163,7 +163,7 @@ func (m *resolvedManager) SetDNS(config OSConfig) error {
RoutingOnly: true, RoutingOnly: true,
}) })
} }
if len(config.MatchDomains) == 0 { if len(config.MatchDomains) == 0 && len(config.Nameservers) > 0 {
// Caller requested full DNS interception, install a // Caller requested full DNS interception, install a
// routing-only root domain. // routing-only root domain.
linkDomains = append(linkDomains, resolvedLinkDomain{ linkDomains = append(linkDomains, resolvedLinkDomain{

Loading…
Cancel
Save