summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-link.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-08-01 17:03:28 +0200
committerLennart Poettering <lennart@poettering.net>2014-08-01 18:10:01 +0200
commit5cb36f41f01cf4b1f4395abfffd1b33116591e58 (patch)
tree1b8b7e319ce4d7d3ea94a3e84aa9e41723270faa /src/resolve/resolved-link.c
parentafe7fd56f5b5b81294dcb794214f97fc5e39dfea (diff)
resolved: read the system /etc/resolv.conf unless we wrote it ourselves
This way we integrate nicely with foreign network management stacks, such as NM.
Diffstat (limited to 'src/resolve/resolved-link.c')
-rw-r--r--src/resolve/resolved-link.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/resolve/resolved-link.c b/src/resolve/resolved-link.c
index 93ccc04491..7418ea1ed9 100644
--- a/src/resolve/resolved-link.c
+++ b/src/resolve/resolved-link.c
@@ -150,13 +150,13 @@ static int link_update_dns_servers(Link *l) {
assert(l);
- LIST_FOREACH(servers, s, l->dns_servers)
- s->marked = true;
-
r = sd_network_get_dns(l->ifindex, &nameservers);
if (r < 0)
goto clear;
+ LIST_FOREACH(servers, s, l->dns_servers)
+ s->marked = true;
+
STRV_FOREACH(nameserver, nameservers) {
union in_addr_union a;
int family;