summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-conf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/resolve/resolved-conf.c')
-rw-r--r--src/resolve/resolved-conf.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/resolve/resolved-conf.c b/src/resolve/resolved-conf.c
index 0def80e3a5..ae3773f4f7 100644
--- a/src/resolve/resolved-conf.c
+++ b/src/resolve/resolved-conf.c
@@ -94,20 +94,27 @@ int config_parse_dnsv(
else
l = &m->dns_servers;
- /* Empty assignment means clear the list */
if (isempty(rvalue)) {
+
+ /* Empty assignment means clear the list */
while (*l)
dns_server_free(*l);
- return 0;
- }
+ } else {
- r = manager_parse_dns_server(m, ltype, rvalue);
- if (r < 0) {
- log_syntax(unit, LOG_ERR, filename, line, -r, "Failed to parse DNS server string '%s'. Ignoring.", rvalue);
- return 0;
+ /* Otherwise add to the list */
+ r = manager_parse_dns_server(m, ltype, rvalue);
+ if (r < 0) {
+ log_syntax(unit, LOG_ERR, filename, line, -r, "Failed to parse DNS server string '%s'. Ignoring.", rvalue);
+ return 0;
+ }
}
+ /* If we have a manual setting, then we stop reading
+ * /etc/resolv.conf */
+ if (ltype == DNS_SERVER_SYSTEM)
+ m->read_resolv_conf = false;
+
return 0;
}