mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-16 03:31:39 +00:00
ipn/ipnlocal: only set authoritative domains when using MagicDNS.
Otherwise, the existence of authoritative domains forces full DNS proxying even when no other DNS config is present. Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
parent
53213114ec
commit
48d4f14652
@ -1617,7 +1617,6 @@ func (b *LocalBackend) authReconfig() {
|
|||||||
}
|
}
|
||||||
dcfg.SearchDomains = append(dcfg.SearchDomains, fqdn)
|
dcfg.SearchDomains = append(dcfg.SearchDomains, fqdn)
|
||||||
}
|
}
|
||||||
dcfg.AuthoritativeSuffixes = magicDNSRootDomains(nm)
|
|
||||||
set := func(name string, addrs []netaddr.IPPrefix) {
|
set := func(name string, addrs []netaddr.IPPrefix) {
|
||||||
if len(addrs) == 0 || name == "" {
|
if len(addrs) == 0 || name == "" {
|
||||||
return
|
return
|
||||||
@ -1633,6 +1632,7 @@ func (b *LocalBackend) authReconfig() {
|
|||||||
dcfg.Hosts[fqdn] = ips
|
dcfg.Hosts[fqdn] = ips
|
||||||
}
|
}
|
||||||
if nm.DNS.Proxied { // actually means "enable MagicDNS"
|
if nm.DNS.Proxied { // actually means "enable MagicDNS"
|
||||||
|
dcfg.AuthoritativeSuffixes = magicDNSRootDomains(nm)
|
||||||
dcfg.Hosts = map[dnsname.FQDN][]netaddr.IP{}
|
dcfg.Hosts = map[dnsname.FQDN][]netaddr.IP{}
|
||||||
set(nm.Name, nm.Addresses)
|
set(nm.Name, nm.Addresses)
|
||||||
for _, peer := range nm.Peers {
|
for _, peer := range nm.Peers {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user