From 89888f85aa5c6f115d2dda1888b4e5ce0946c634 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Thu, 2 Mar 2023 18:02:48 +0100 Subject: [PATCH] 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: 1f0d1d78d2a2 ('dns-manager: always apply options from [global-dns]') (cherry picked from commit 5c0a927e0fd983a963f49cf8dccba6a82c95ef94) --- src/core/dns/nm-dns-dnsmasq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); }