summaryrefslogtreecommitdiffstats
path: root/src/resolve/resolved-dns-scope.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-03-26 18:31:33 +0100
committerLennart Poettering <lennart@poettering.net>2021-04-23 12:02:20 +0200
commitee18f107d3d64b39e4e361e54924ca165f25d4e8 (patch)
treec1efff973a6752fc31afe5a483c04cbd7c8453aa /src/resolve/resolved-dns-scope.c
parentnss-myhostname: expose the "outbound" IP addresses under the synthetic "_outb... (diff)
downloadsystemd-ee18f107d3d64b39e4e361e54924ca165f25d4e8.tar.xz
systemd-ee18f107d3d64b39e4e361e54924ca165f25d4e8.zip
resolved: synthesize _outbound magic hostname here too
Diffstat (limited to 'src/resolve/resolved-dns-scope.c')
-rw-r--r--src/resolve/resolved-dns-scope.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/resolve/resolved-dns-scope.c b/src/resolve/resolved-dns-scope.c
index e155df0efa..178482727c 100644
--- a/src/resolve/resolved-dns-scope.c
+++ b/src/resolve/resolved-dns-scope.c
@@ -630,8 +630,8 @@ DnsScopeMatch dns_scope_good_domain(
if (dns_name_endswith(domain, "invalid") > 0)
return DNS_SCOPE_NO;
- /* Never go to network for the _gateway domain, it's something special, synthesized locally. */
- if (is_gateway_hostname(domain))
+ /* Never go to network for the _gateway or _outbound domain — they're something special, synthesized locally. */
+ if (is_gateway_hostname(domain) || is_outbound_hostname(domain))
return DNS_SCOPE_NO;
switch (s->protocol) {
@@ -739,6 +739,7 @@ DnsScopeMatch dns_scope_good_domain(
if ((dns_name_is_single_label(domain) && /* only resolve single label names via LLMNR */
!is_gateway_hostname(domain) && /* don't resolve "_gateway" with LLMNR, let local synthesizing logic handle that */
+ !is_outbound_hostname(domain) && /* similar for "_outbound" */
dns_name_equal(domain, "local") == 0 && /* don't resolve "local" with LLMNR, it's the top-level domain of mDNS after all, see above */
manager_is_own_hostname(s->manager, domain) <= 0)) /* never resolve the local hostname via LLMNR */
return DNS_SCOPE_YES_BASE + 1; /* Return +1, as we consider ourselves authoritative