diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2023-03-03 14:53:29 +0100 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2023-03-03 14:53:29 +0100 |
commit | 06219dbcf9012f45aabd12bf9a51c16fb00fe19d (patch) | |
tree | 4cf02e61ea8ee9a8bcf58fbeb57a16d9e09b90c3 | |
parent | 713de313dca9148a5908ad96f17c455fcf551fe1 (diff) | |
parent | f57a848da5aa1a18cdcec22e9564462dea68a53f (diff) | |
download | NetworkManager-06219dbcf9012f45aabd12bf9a51c16fb00fe19d.tar.gz |
merge: branch 'bg/dnsmasq-global-conf'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1555
-rw-r--r-- | man/NetworkManager.conf.xml | 17 | ||||
-rw-r--r-- | src/core/dns/nm-dns-dnsmasq.c | 3 |
2 files changed, 13 insertions, 7 deletions
diff --git a/man/NetworkManager.conf.xml b/man/NetworkManager.conf.xml index 2c1fc85217..0dcf805d56 100644 --- a/man/NetworkManager.conf.xml +++ b/man/NetworkManager.conf.xml @@ -1453,8 +1453,8 @@ managed=1 <refsect1> <title><literal>global-dns</literal> section</title> - <para>This section specifies global DNS settings that override - connection-specific configuration.</para> + <para>This section specifies DNS settings that are applied + globally, in addition to connection-specific ones.</para> <para> <variablelist> <varlistentry> @@ -1482,10 +1482,15 @@ managed=1 <para>Sections with a name starting with the "global-dns-domain-" prefix allow to define global DNS configuration for specific domains. The part of section name after "global-dns-domain-" - specifies the domain name a section applies to. More specific - domains have the precedence over less specific ones and the - default domain is represented by the wildcard "*". A default - domain section is mandatory. + specifies the domain name a section applies to (for example, a + section could be named "global-dns-domain-foobar.com"). More + specific domains have the precedence over less specific ones and + the default domain is represented by the wildcard "*". + + To be valid, global DNS domains must include a section for the + default domain "*". When the global DNS domains are valid, the + name servers and domains defined globally override the ones from + active connections. </para> <para> <variablelist> diff --git a/src/core/dns/nm-dns-dnsmasq.c b/src/core/dns/nm-dns-dnsmasq.c index 8ae1bb961b..05aeff492d 100644 --- a/src/core/dns/nm-dns-dnsmasq.c +++ b/src/core/dns/nm-dns-dnsmasq.c @@ -922,7 +922,8 @@ create_update_args(NMDnsDnsmasq *self, if (global_config) add_global_config(self, &servers, global_config); - else { + + if (!global_config || !nm_global_dns_config_lookup_domain(global_config, "*")) { c_list_for_each_entry (ip_data, ip_data_lst_head, ip_data_lst) add_ip_config(self, &servers, ip_data); } |