mirror of
https://github.com/tailscale/tailscale.git
synced 2025-01-08 09:07:44 +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 (
|
import (
|
||||||
"sort"
|
"sort"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"inet.af/netaddr"
|
"inet.af/netaddr"
|
||||||
)
|
)
|
||||||
@ -91,14 +92,14 @@ func (c Config) matchDomains() []string {
|
|||||||
if seen[suffix] {
|
if seen[suffix] {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
ret = append(ret, suffix)
|
ret = append(ret, strings.TrimSuffix(suffix, "."))
|
||||||
seen[suffix] = true
|
seen[suffix] = true
|
||||||
}
|
}
|
||||||
for suffix := range c.Routes {
|
for suffix := range c.Routes {
|
||||||
if seen[suffix] {
|
if seen[suffix] {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
ret = append(ret, suffix)
|
ret = append(ret, strings.TrimSuffix(suffix, "."))
|
||||||
seen[suffix] = true
|
seen[suffix] = true
|
||||||
}
|
}
|
||||||
sort.Strings(ret)
|
sort.Strings(ret)
|
||||||
|
@ -154,7 +154,7 @@ func (m *Manager) compileConfig(cfg Config) (resolver.Config, OSConfig, error) {
|
|||||||
LocalDomains: addFQDNDots(cfg.AuthoritativeSuffixes),
|
LocalDomains: addFQDNDots(cfg.AuthoritativeSuffixes),
|
||||||
}
|
}
|
||||||
for suffix, resolvers := range cfg.Routes {
|
for suffix, resolvers := range cfg.Routes {
|
||||||
rcfg.Routes[suffix+"."] = resolvers
|
rcfg.Routes[suffix] = resolvers
|
||||||
}
|
}
|
||||||
ocfg = OSConfig{
|
ocfg = OSConfig{
|
||||||
Nameservers: []netaddr.IP{tsaddr.TailscaleServiceIP()},
|
Nameservers: []netaddr.IP{tsaddr.TailscaleServiceIP()},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user