From 294131a2a41f8773aaf15abebb461fb3fbf7a7dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=8D=C3=B1igo=20Huguet?= Date: Wed, 20 Aug 2025 08:28:01 +0200 Subject: [PATCH] core: dbus: accept global DNS configuration without a default domain Since 1.44 we accept a global-dns section without any global-dns-domain section, so users can define searches and options without defining any global DNS servers. When set from the D-Bus API it was still rejected. Fix it. Fixes: 1f0d1d78d2a2 ('dns-manager: always apply options from [global-dns]') --- src/core/nm-config-data.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/core/nm-config-data.c b/src/core/nm-config-data.c index 5a84a2c894..a23d622fa3 100644 --- a/src/core/nm-config-data.c +++ b/src/core/nm-config-data.c @@ -1606,17 +1606,6 @@ nm_global_dns_config_from_dbus(const GValue *value, GError **error) g_variant_unref(val); } - /* An empty value is valid and clears the internal configuration */ - if (!nm_global_dns_config_is_empty(dns_config) - && !nm_global_dns_config_lookup_domain(dns_config, "*")) { - g_set_error_literal(error, - NM_MANAGER_ERROR, - NM_MANAGER_ERROR_FAILED, - "Global DNS configuration is missing the default domain"); - nm_global_dns_config_free(dns_config); - return NULL; - } - global_dns_config_seal_domains(dns_config); return dns_config; }