mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-03 02:21:58 +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:
@@ -6,6 +6,7 @@ package dns
|
||||
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user