summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/resolve/resolved-manager.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/resolve/resolved-manager.c b/src/resolve/resolved-manager.c
index 0594479787..2edfb9f7fd 100644
--- a/src/resolve/resolved-manager.c
+++ b/src/resolve/resolved-manager.c
@@ -667,6 +667,16 @@ int manager_read_resolv_conf(Manager *m) {
if (s->marked)
dns_server_free(s);
+ /* Whenever /etc/resolv.conf changes, start using the first
+ * DNS server of it. This is useful to deal with broken
+ * network managing implementations (like NetworkManager),
+ * that when connecting to a VPN place both the VPN DNS
+ * servers and the local ones in /etc/resolv.conf. Without
+ * resetting the DNS server to use back to the first entry we
+ * will continue to use the local one thus being unable to
+ * resolve VPN domains. */
+ manager_set_dns_server(m, m->dns_servers);
+
return 0;
clear: