From c6685f0179427262aab28dbfd3f2f2e6889df9a0 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Mon, 12 Sep 2022 13:17:50 +0200 Subject: [PATCH] config: fix a reversed conditional This effectively makes [*global-dns-domain-*] sections in configuration be ignored unless [*global-dns] is also present. This happens because nm_config_keyfile_has_global_dns_config() mixes the group names up and attempts to loop up [.intern.global-dns-domain-*] in user configuration and [global-dns-domain-*] in the internal one. Fixes: da0ded49279c ('config: drop global-dns.enable option in favor of .config.enable') (cherry picked from commit de1c06daab7691986d16925c2107b1e8c30d0f47) (cherry picked from commit bd4f5333e8db86040a763b75745469984f5be7fe) --- src/core/nm-config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/nm-config.c b/src/core/nm-config.c index 3d23d4f6cd..62e4e7ea4b 100644 --- a/src/core/nm-config.c +++ b/src/core/nm-config.c @@ -1509,8 +1509,8 @@ nm_config_keyfile_has_global_dns_config(GKeyFile *keyfile, gboolean internal) if (!keyfile) return FALSE; if (g_key_file_has_group(keyfile, - internal ? NM_CONFIG_KEYFILE_GROUP_GLOBAL_DNS - : NM_CONFIG_KEYFILE_GROUP_INTERN_GLOBAL_DNS)) + internal ? NM_CONFIG_KEYFILE_GROUP_INTERN_GLOBAL_DNS + : NM_CONFIG_KEYFILE_GROUP_GLOBAL_DNS)) return TRUE; groups = g_key_file_get_groups(keyfile, NULL);