summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-dns-query.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-11-27 00:06:19 +0100
committerLennart Poettering <lennart@poettering.net>2015-11-27 00:06:19 +0100
commit6627b7e2215a4f5bc44198adb111c2b05ff80970 (patch)
treeb3b2bea6862a74d2f6eb513a8c771a3a9f65405f /src/resolve/resolved-dns-query.c
parentf9ebb22ab4758bc5bbaaf8eeead74b5b4f81d5c3 (diff)
resolved: don't follow the global search list on local scopes
It probably doesn't make sense to mix local and global configuration. Applying global search lists to local DNS servers appears unnecessary and creates problems because we'll traverse the search domains non-simultaneously on multiple scopes. Also see: https://github.com/systemd/systemd/pull/2031
Diffstat (limited to 'src/resolve/resolved-dns-query.c')
-rw-r--r--src/resolve/resolved-dns-query.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/resolve/resolved-dns-query.c b/src/resolve/resolved-dns-query.c
index fe99caff37..a96cf439ad 100644
--- a/src/resolve/resolved-dns-query.c
+++ b/src/resolve/resolved-dns-query.c
@@ -94,31 +94,19 @@ static int dns_query_candidate_next_search_domain(DnsQueryCandidate *c) {
if (c->search_domain && c->search_domain->linked) {
next = c->search_domain->domains_next;
- if (!next) {
- /* We hit the last entry. Let's see if this
- * was the per-link search domain list. If so,
- * let's continue with the global one. */
-
- if (c->search_domain->type == DNS_SEARCH_DOMAIN_LINK)
- next = c->query->manager->search_domains;
-
- if (!next) /* Still no item? Then we really hit the end of the list. */
- return 0;
- }
+ if (!next) /* We hit the end of the list */
+ return 0;
} else {
- /* If we have, start with the per-link domains */
next = dns_scope_get_search_domains(c->scope);
- if (!next) /* Fall back to the global search domains */
- next = c->scope->manager->search_domains;
-
- if (!next) /* OK, there's really nothing. */
+ if (!next) /* OK, there's nothing. */
return 0;
}
dns_search_domain_unref(c->search_domain);
c->search_domain = dns_search_domain_ref(next);
+
return 1;
}