mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-07 11:58:12 +02:00
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: 1f0d1d78d2 ('dns-manager: always apply options from [global-dns]')
This commit is contained in:
parent
05efc6e253
commit
294131a2a4
1 changed files with 0 additions and 11 deletions
|
|
@ -1606,17 +1606,6 @@ nm_global_dns_config_from_dbus(const GValue *value, GError **error)
|
||||||
g_variant_unref(val);
|
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);
|
global_dns_config_seal_domains(dns_config);
|
||||||
return dns_config;
|
return dns_config;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue