]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Revert "resolve: query the parent zone for DS records"
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 16 Apr 2025 21:53:02 +0000 (06:53 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 10 Jul 2025 13:18:07 +0000 (15:18 +0200)
This reverts commit 49ff90c70debc59f5a52e5cec5a92507d9868b9d.

src/resolve/resolved-dns-question.c
src/resolve/resolved-dns-question.h
src/resolve/resolved-dns-scope.c

index 9288aa0af8c87ef6de500c2058fea715b1ea7720..ddbb663b189d4023cee2ac799804fa2d78a2d93a 100644 (file)
@@ -552,12 +552,3 @@ int dns_question_merge(DnsQuestion *a, DnsQuestion *b, DnsQuestion **ret) {
         *ret = TAKE_PTR(k);
         return 0;
 }
-
-bool dns_question_contains_key_type(DnsQuestion *q, uint16_t type) {
-        DnsResourceKey *t;
-        DNS_QUESTION_FOREACH(t, q)
-                if (t->type == type)
-                        return true;
-
-        return false;
-}
index 15ea3024eca4c3b025556f6ee39f31677f94c15a..d4298a60311ce656164d2a24bf47b09abb08115f 100644 (file)
@@ -57,8 +57,6 @@ static inline bool dns_question_isempty(DnsQuestion *q) {
 
 int dns_question_merge(DnsQuestion *a, DnsQuestion *b, DnsQuestion **ret);
 
-bool dns_question_contains_key_type(DnsQuestion *q, uint16_t type);
-
 DEFINE_TRIVIAL_CLEANUP_FUNC(DnsQuestion*, dns_question_unref);
 
 #define _DNS_QUESTION_FOREACH(u, k, q)                                     \
index 72b918b3cfce52da9372ab7fb285edc0a38f29e9..867158aa7163a49fc349a79aeb4d0cbd6a16d950 100644 (file)
@@ -764,11 +764,6 @@ DnsScopeMatch dns_scope_good_domain(
                 if (!dns_scope_get_dns_server(s))
                         return DNS_SCOPE_NO;
 
-                /* Route DS requests to the parent */
-                const char *route_domain = domain;
-                if (dns_question_contains_key_type(question, DNS_TYPE_DS))
-                        (void) dns_name_parent(&route_domain);
-
                 /* Always honour search domains for routing queries, except if this scope lacks DNS servers. Note that
                  * we return DNS_SCOPE_YES here, rather than just DNS_SCOPE_MAYBE, which means other wildcard scopes
                  * won't be considered anymore. */
@@ -777,7 +772,7 @@ DnsScopeMatch dns_scope_good_domain(
                         if (!d->route_only && !dns_name_is_root(d->name))
                                 has_search_domains = true;
 
-                        if (dns_name_endswith(route_domain, d->name) > 0) {
+                        if (dns_name_endswith(domain, d->name) > 0) {
                                 int c;
 
                                 c = dns_name_count_labels(d->name);