From 93378260115b77ebfbed050e23aadbae2c3e0963 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 15 Jun 2021 20:53:03 -0700 Subject: [PATCH] net/dns: fix inverted test for NetworkManager version. Signed-off-by: David Anderson --- net/dns/manager_linux.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/dns/manager_linux.go b/net/dns/manager_linux.go index eaba491fd..05f62a8d6 100644 --- a/net/dns/manager_linux.go +++ b/net/dns/manager_linux.go @@ -168,8 +168,8 @@ func nmVersionBetween(first, last string) (bool, error) { return false, fmt.Errorf("unexpected type %T for NM version", v.Value()) } - inInterval := cmpver.Compare(version, first) < 0 || cmpver.Compare(version, last) > 0 - return inInterval, nil + outside := cmpver.Compare(version, first) < 0 || cmpver.Compare(version, last) > 0 + return !outside, nil } func nmIsUsingResolved() error {