net/dns: make debian_resolvconf correctly clear DNS configs.

More of #1720.

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson
2021-04-20 15:51:14 -07:00
parent 3b1ab78954
commit 53213114ec
3 changed files with 33 additions and 16 deletions

View File

@@ -52,6 +52,10 @@ type OSConfig struct {
MatchDomains []dnsname.FQDN
}
func (o OSConfig) IsZero() bool {
return len(o.Nameservers) == 0 && len(o.SearchDomains) == 0 && len(o.MatchDomains) == 0
}
func (a OSConfig) Equal(b OSConfig) bool {
if len(a.Nameservers) != len(b.Nameservers) {
return false