summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-link.c
diff options
context:
space:
mode:
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;