summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-resolv-conf.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-11-24 21:27:29 +0100
committerLennart Poettering <lennart@poettering.net>2015-11-25 21:58:38 +0100
commit4b95f1798f22c1bb75295f448188560cb6ec9ece (patch)
treea558209fdb4450717d3d28c4987140ed4f5b33b8 /src/resolve/resolved-resolv-conf.c
parenta51c10485af349eb15faa4d1a63b9818bcf3e589 (diff)
resolved: unify DnsServer handling code between Link and Manager
This copies concepts we introduced for the DnsSearchDomain stuff, and reworks the operations on lists of dns servers to be reusable and generic for use both with the Link and the Manager object.
Diffstat (limited to 'src/resolve/resolved-resolv-conf.c')
-rw-r--r--src/resolve/resolved-resolv-conf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/resolve/resolved-resolv-conf.c b/src/resolve/resolved-resolv-conf.c
index 2ab0008fce..f5cce670f0 100644
--- a/src/resolve/resolved-resolv-conf.c
+++ b/src/resolve/resolved-resolv-conf.c
@@ -85,7 +85,7 @@ int manager_read_resolv_conf(Manager *m) {
goto clear;
}
- manager_mark_dns_servers(m, DNS_SERVER_SYSTEM);
+ dns_server_mark_all(m->dns_servers);
dns_search_domain_mark_all(m->search_domains);
FOREACH_LINE(line, f, r = -errno; goto clear) {
@@ -118,7 +118,7 @@ int manager_read_resolv_conf(Manager *m) {
/* Flush out all servers and search domains that are still
* marked. Those are then ones that didn't appear in the new
* /etc/resolv.conf */
- manager_flush_marked_dns_servers(m, DNS_SERVER_SYSTEM);
+ dns_server_unlink_marked(m->dns_servers);
dns_search_domain_unlink_marked(m->search_domains);
/* Whenever /etc/resolv.conf changes, start using the first
@@ -134,7 +134,7 @@ int manager_read_resolv_conf(Manager *m) {
return 0;
clear:
- manager_flush_dns_servers(m, DNS_SERVER_SYSTEM);
+ dns_server_unlink_all(m->dns_servers);
dns_search_domain_unlink_all(m->search_domains);
return r;
}