resolved: demote the fallback dns servers

This softens the behavior originally introduced in eded61e410 to apply
only to the fallback dns servers.

The intent is that the global FallbackDNS (instead of DNS) can now be
used in conjunction with the per-link dns, providing a fallback behavior
without introducing a scope overlap.

References: eded61e410 (resolved: demote the global unicast scope, 2024-08-19)
This commit is contained in:
Ronan Pigott
2024-08-21 10:27:07 -07:00
parent 760fa203c2
commit d229e282d6
2 changed files with 7 additions and 2 deletions
+4
View File
@@ -778,6 +778,10 @@ DnsScopeMatch dns_scope_good_domain(
if (!dns_scope_is_default_route(s))
return DNS_SCOPE_NO;
/* Prefer suitable per-link scopes where possible */
if (dns_server_is_fallback(dns_scope_get_dns_server(s)))
return DNS_SCOPE_LAST_RESORT;
return DNS_SCOPE_MAYBE;
}