mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
ipn/ipnlocal: initialize DNS config maps unconditionally.
Fixes #1963. Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
parent
eb9757a290
commit
df350e2069
@ -1694,7 +1694,10 @@ func (b *LocalBackend) authReconfig() {
|
||||
|
||||
rcfg := b.routerConfig(cfg, uc)
|
||||
|
||||
var dcfg dns.Config
|
||||
dcfg := dns.Config{
|
||||
Routes: map[dnsname.FQDN][]netaddr.IPPort{},
|
||||
Hosts: map[dnsname.FQDN][]netaddr.IP{},
|
||||
}
|
||||
|
||||
// Populate MagicDNS records. We do this unconditionally so that
|
||||
// quad-100 can always respond to MagicDNS queries, even if the OS
|
||||
@ -1725,7 +1728,6 @@ func (b *LocalBackend) authReconfig() {
|
||||
}
|
||||
dcfg.Hosts[fqdn] = ips
|
||||
}
|
||||
dcfg.Hosts = map[dnsname.FQDN][]netaddr.IP{}
|
||||
set(nm.Name, nm.Addresses)
|
||||
for _, peer := range nm.Peers {
|
||||
set(peer.Name, peer.Addresses)
|
||||
@ -1744,9 +1746,6 @@ func (b *LocalBackend) authReconfig() {
|
||||
}
|
||||
|
||||
addDefault(nm.DNS.Resolvers)
|
||||
if len(nm.DNS.Routes) > 0 {
|
||||
dcfg.Routes = map[dnsname.FQDN][]netaddr.IPPort{}
|
||||
}
|
||||
for suffix, resolvers := range nm.DNS.Routes {
|
||||
fqdn, err := dnsname.ToFQDN(suffix)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user