mirror of
https://github.com/tailscale/tailscale.git
synced 2025-02-18 02:48:40 +00:00
net/dns: [win] respond with SERVFAIL queries when no resolvers
Currently we forward unmatched queries to the default resolver on Windows. This results in duplicate queries being issued to the same resolver which is just wasted. Updates #1659 Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
parent
548fa63e49
commit
1cff719015
@ -214,12 +214,11 @@ func (m *Manager) compileConfig(cfg Config) (rcfg resolver.Config, ocfg OSConfig
|
||||
rcfg.Routes = routes
|
||||
ocfg.Nameservers = []netip.Addr{cfg.serviceIP()}
|
||||
|
||||
// If the OS can't do native split-dns, read out the underlying
|
||||
// resolver config and blend it into our config.
|
||||
if m.os.SupportsSplitDNS() {
|
||||
ocfg.MatchDomains = cfg.matchDomains()
|
||||
}
|
||||
if !m.os.SupportsSplitDNS() || isWindows {
|
||||
} else {
|
||||
// If the OS can't do native split-dns, read out the underlying
|
||||
// resolver config and blend it into our config.
|
||||
bcfg, err := m.os.GetBaseConfig()
|
||||
if err != nil {
|
||||
health.SetDNSOSHealth(err)
|
||||
|
Loading…
x
Reference in New Issue
Block a user