net/dns: fix inverted test for NetworkManager version.

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson 2021-06-15 20:53:03 -07:00
parent 320cc8fa21
commit 9337826011

View File

@ -168,8 +168,8 @@ func nmVersionBetween(first, last string) (bool, error) {
return false, fmt.Errorf("unexpected type %T for NM version", v.Value()) return false, fmt.Errorf("unexpected type %T for NM version", v.Value())
} }
inInterval := cmpver.Compare(version, first) < 0 || cmpver.Compare(version, last) > 0 outside := cmpver.Compare(version, first) < 0 || cmpver.Compare(version, last) > 0
return inInterval, nil return !outside, nil
} }
func nmIsUsingResolved() error { func nmIsUsingResolved() error {