dnsmasq: process both global and per-device configuration

The global configuration now can be valid when there are no global
domains defined. The dnsmasq backend must process it and then, if
there is no global default domain, also process the per-connection
settings.

Fixes: 1f0d1d78d2 ('dns-manager: always apply options from [global-dns]')
(cherry picked from commit 5c0a927e0f)
This commit is contained in:
Beniamino Galvani 2023-03-02 18:02:48 +01:00
parent 4353f84230
commit 89888f85aa

View file

@ -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);
}