From 0b58db658b5c3f586ac3a837427f1f7fec2abb2e Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 24 Nov 2015 20:50:37 +0100 Subject: 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. --- src/resolve/resolved-conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/resolve/resolved-conf.c') diff --git a/src/resolve/resolved-conf.c b/src/resolve/resolved-conf.c index 7e3b613816..c11a8badd9 100644 --- a/src/resolve/resolved-conf.c +++ b/src/resolve/resolved-conf.c @@ -48,7 +48,7 @@ int manager_add_dns_server_by_string(Manager *m, DnsServerType type, const char * manager_mark_dns_servers() and * manager_flush_marked_dns_servers(). */ - s->marked = false; + dns_server_move_back_and_unmark(s); return 0; } -- cgit v1.2.3-54-g00ecf