wgengine: take in dns.Config, split out to resolver.Config and dns.OSConfig.

Stepping stone towards having the DNS package handle the config splitting.

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson
2021-04-02 00:34:32 -07:00
committed by Dave Anderson
parent 2edb57dbf1
commit 6ad44f9fdf
7 changed files with 61 additions and 48 deletions

View File

@ -42,18 +42,11 @@ type OSConfig struct {
Nameservers []netaddr.IP
// Domains are the search domains to use.
Domains []string
// Proxied indicates whether DNS requests are proxied through a dns.Resolver.
// This enables MagicDNS.
Proxied bool
}
// Equal determines whether its argument and receiver
// represent equivalent DNS configurations (then DNS reconfig is a no-op).
func (lhs OSConfig) Equal(rhs OSConfig) bool {
if lhs.Proxied != rhs.Proxied {
return false
}
if len(lhs.Nameservers) != len(rhs.Nameservers) {
return false
}