about summary refs log tree commit diff
path: root/src/dns-manager/nm-dns-dnsmasq.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dns-manager/nm-dns-dnsmasq.c')
-rw-r--r--src/dns-manager/nm-dns-dnsmasq.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dns-manager/nm-dns-dnsmasq.c b/src/dns-manager/nm-dns-dnsmasq.c
index 9090e26b..5d37e374 100644
--- a/src/dns-manager/nm-dns-dnsmasq.c
+++ b/src/dns-manager/nm-dns-dnsmasq.c
@@ -79,6 +79,9 @@ add_ip4_config (GString *str, NMIP4Config *ip4, gboolean split)
 	if (split) {
 		char **domains, **iter;
 
+		if (nm_ip4_config_get_num_nameservers (ip4) == 0)
+			return FALSE;
+
 		/* FIXME: it appears that dnsmasq can only handle one nameserver
 		 * per domain (and the manpage says this too) so only use the first
 		 * nameserver here.
@@ -188,6 +191,9 @@ add_ip6_config (GString *str, NMIP6Config *ip6, gboolean split, const char *ifac
 	gboolean added = FALSE;
 
 	if (split) {
+		if (nm_ip6_config_get_num_nameservers (ip6) == 0)
+			return FALSE;
+
 		/* FIXME: it appears that dnsmasq can only handle one nameserver
 		 * per domain (at the manpage seems to indicate that) so only use
 		 * the first nameserver here.