diff --git a/man/systemd-resolved.service.xml b/man/systemd-resolved.service.xml index 13c0da987f..34f05bd8b0 100644 --- a/man/systemd-resolved.service.xml +++ b/man/systemd-resolved.service.xml @@ -217,7 +217,10 @@ If a query does not match any configured routing domain (either per-link or global), it is sent to all DNS servers that are configured on links with the DefaultRoute= - option set, as well as the globally configured DNS server. + option set. + + If no links are configured with DefaultRoute=, it is sent to the + globally configured DNS server. If there is no link configured as DefaultRoute= and no global DNS server configured, one of the compiled-in fallback DNS servers is used. diff --git a/src/resolve/resolved-dns-scope.c b/src/resolve/resolved-dns-scope.c index 21b9844e04..3bb7c0aa21 100644 --- a/src/resolve/resolved-dns-scope.c +++ b/src/resolve/resolved-dns-scope.c @@ -778,7 +778,8 @@ DnsScopeMatch dns_scope_good_domain( if (!dns_scope_is_default_route(s)) return DNS_SCOPE_NO; - return DNS_SCOPE_MAYBE; + /* Prefer suitable per-link scopes where possible */ + return s->link ? DNS_SCOPE_MAYBE : DNS_SCOPE_LAST_RESORT; } case DNS_PROTOCOL_MDNS: {