better docstrings, try to appease linter in test file

Signed-off-by: Michael Ben-Ami <mzb@tailscale.com>
This commit is contained in:
Michael Ben-Ami
2025-08-07 12:23:13 -04:00
parent 1fa868f3a1
commit 223fb5bbdd
2 changed files with 8 additions and 6 deletions

View File

@@ -2122,7 +2122,6 @@ func TestDNSConfigForNetmapForExitNodeConfigs(t *testing.T) {
"empty.example.com.": []*dnstype.Resolver{},
"route.example.com.": {{Addr: "route.example.com"}},
}
_ = containsEmptyRoutes
containsFlaggedRoutes := map[dnsname.FQDN][]*dnstype.Resolver{
"route.example.com.": {{Addr: "route.example.com"}},
"withexit.example.com.": {{Addr: tsUseWithExitNodeResolverAddr}},
@@ -2132,7 +2131,6 @@ func TestDNSConfigForNetmapForExitNodeConfigs(t *testing.T) {
"route.example.com.": {{Addr: "route.example.com"}},
"withexit.example.com.": {{Addr: tsUseWithExitNodeResolverAddr}},
}
_ = containsFlaggedAndEmptyRoutes
flaggedRoutes := map[dnsname.FQDN][]*dnstype.Resolver{
"withexit.example.com.": {{Addr: tsUseWithExitNodeResolverAddr}},
}
@@ -2143,7 +2141,6 @@ func TestDNSConfigForNetmapForExitNodeConfigs(t *testing.T) {
"empty.example.com.": []*dnstype.Resolver{},
"withexit.example.com.": {{Addr: tsUseWithExitNodeResolverAddr}},
}
_ = flaggedAndEmptyRoutes
stringifyRoutes := func(routes map[dnsname.FQDN][]*dnstype.Resolver) map[string][]*tailcfg.DNSResolver {
if routes == nil {

View File

@@ -1699,11 +1699,16 @@ var FilterAllowAll = []FilterRule{
},
}
// DNSResolver embeds dnstype.Resolver and stores
// additional configuration.
// DNSResolver describes a single DNS resolver and any special handling needed when
// using that resolver.
type DNSResolver struct {
dnstype.Resolver `json:",omitempty"`
UseWithExitNode bool `json:",omitempty"`
// UseWithExitNode designates that this resolver should continue to be used when an
// exit node is in use. Normally, DNS resolution is delegated to the exit node but
// there are situations where it is preferable to still use a Split DNS server and/or
// global DNS server instead of the exit node.
UseWithExitNode bool `json:",omitempty"`
}
// DNSConfig is the DNS configuration.