summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-link.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-11-24 20:50:37 +0100
committerLennart Poettering <lennart@poettering.net>2015-11-25 21:58:38 +0100
commit0b58db658b5c3f586ac3a837427f1f7fec2abb2e (patch)
treefdb47d9ceee7a7d07637ba5d5f2682a3d9d2074d /src/resolve/resolved-link.c
parent444d77fd014d86f3b211abf52981bfb34e7e78be (diff)
resolved: make sure order of dns servers is stable
Previously, we'd keep adding new dns servers we discover to the end of our linked list of servers. When we encountered a pre-existing server, we'd just leave it where it was. In essence that meant that old servers ended up at the front, and new servers at the end, but not in an order that would reflect the configuration. With this change we ensure that every pre-existing server we want to add again we move to the back of the linked list, so that the order is stable and in sync with the requested configuration.
Diffstat (limited to 'src/resolve/resolved-link.c')
-rw-r--r--src/resolve/resolved-link.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/resolve/resolved-link.c b/src/resolve/resolved-link.c
index ef3db773fd..4931fc9d3b 100644
--- a/src/resolve/resolved-link.c
+++ b/src/resolve/resolved-link.c
@@ -174,7 +174,7 @@ static int link_update_dns_servers(Link *l) {
s = link_find_dns_server(l, family, &a);
if (s)
- s->marked = false;
+ dns_server_move_back_and_unmark(s);
else {
r = dns_server_new(l->manager, NULL, DNS_SERVER_LINK, l, family, &a);
if (r < 0)