mirror of
https://github.com/tailscale/tailscale.git
synced 2025-01-05 14:57:49 +00:00
net/dns: make FQDN dot style consistent in more places.
Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
parent
6d01d3bece
commit
b74a8994ca
@ -6,6 +6,7 @@
|
||||
|
||||
import (
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"inet.af/netaddr"
|
||||
)
|
||||
@ -91,14 +92,14 @@ func (c Config) matchDomains() []string {
|
||||
if seen[suffix] {
|
||||
continue
|
||||
}
|
||||
ret = append(ret, suffix)
|
||||
ret = append(ret, strings.TrimSuffix(suffix, "."))
|
||||
seen[suffix] = true
|
||||
}
|
||||
for suffix := range c.Routes {
|
||||
if seen[suffix] {
|
||||
continue
|
||||
}
|
||||
ret = append(ret, suffix)
|
||||
ret = append(ret, strings.TrimSuffix(suffix, "."))
|
||||
seen[suffix] = true
|
||||
}
|
||||
sort.Strings(ret)
|
||||
|
@ -154,7 +154,7 @@ func (m *Manager) compileConfig(cfg Config) (resolver.Config, OSConfig, error) {
|
||||
LocalDomains: addFQDNDots(cfg.AuthoritativeSuffixes),
|
||||
}
|
||||
for suffix, resolvers := range cfg.Routes {
|
||||
rcfg.Routes[suffix+"."] = resolvers
|
||||
rcfg.Routes[suffix] = resolvers
|
||||
}
|
||||
ocfg = OSConfig{
|
||||
Nameservers: []netaddr.IP{tsaddr.TailscaleServiceIP()},
|
||||
|
Loading…
x
Reference in New Issue
Block a user