dns/dnsmasq: use servers without split DNS if no domain was received

When a VPN server doesn't push any DNS domain, we want to use the
received servers for all queries.

https://bugzilla.gnome.org/show_bug.cgi?id=766769
(cherry picked from commit dd3dfad583)
(cherry picked from commit 0c80e38f64)
This commit is contained in:
Beniamino Galvani 2016-05-23 15:02:20 +02:00
parent e7c70c4ab2
commit e9d8c4e44e

View file

@ -100,12 +100,11 @@ add_ip4_config (GString *str, NMIP4Config *ip4, gboolean split)
for (iter = domains; iter && *iter; iter++)
g_string_append_printf (str, "server=/%s/%s\n", *iter, buf);
g_strfreev (domains);
added = TRUE;
}
}
}
/* If no searches or domains, just add the namservers */
/* If no searches or domains, just add the nameservers */
if (!added) {
for (i = 0; i < nnameservers; i++) {
addr = nm_ip4_config_get_nameserver (ip4, i);