From b43d96b0764e63088429f746cd9e515f55286460 Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Tue, 8 Dec 2015 18:29:52 +0100 Subject: resolved: don't send .local requests to DNS servers DNS names ending with .local are specific to mDNS, so don't use them on DNS scopes. --- src/resolve/resolved-dns-scope.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/resolve') diff --git a/src/resolve/resolved-dns-scope.c b/src/resolve/resolved-dns-scope.c index eae903526b..91e23531f5 100644 --- a/src/resolve/resolved-dns-scope.c +++ b/src/resolve/resolved-dns-scope.c @@ -433,7 +433,11 @@ DnsScopeMatch dns_scope_good_domain(DnsScope *s, int ifindex, uint64_t flags, co dns_name_endswith(domain, "8.e.f.ip6.arpa") == 0 && dns_name_endswith(domain, "9.e.f.ip6.arpa") == 0 && dns_name_endswith(domain, "a.e.f.ip6.arpa") == 0 && - dns_name_endswith(domain, "b.e.f.ip6.arpa") == 0) + dns_name_endswith(domain, "b.e.f.ip6.arpa") == 0 && + /* If networks use .local in their private setups, they are supposed to also add .local to their search + * domains, which we already checked above. Otherwise, we consider .local specific to mDNS and won't + * send such queries ordinary DNS servers. */ + dns_name_endswith(domain, "local") == 0) return DNS_SCOPE_MAYBE; return DNS_SCOPE_NO; -- cgit v1.2.3-54-g00ecf