]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Also look for additional records in dns_adb_find
authorMark Andrews <marka@isc.org>
Mon, 14 Aug 2023 00:26:18 +0000 (10:26 +1000)
committerEvan Hunt <each@isc.org>
Wed, 1 Nov 2023 15:49:08 +0000 (16:49 +0100)
If a child zone is served by the same servers as a parent zone and
a NS query is made for the zone name then the addresses of the
nameservers are returned in the additional section are tagged as
trust additional.

lib/dns/adb.c

index 422666d6bf59111ac5e5ecdcb6e57b18cb562361..b9aa2852969379354ed78fe082aade75b446ee35 100644 (file)
@@ -2658,10 +2658,11 @@ dbfind_name(dns_adbname_t *adbname, isc_stdtime_t now, dns_rdatatype_t rdtype) {
         * any matching static-stub zone without looking into the cache to honor
         * the configuration on which server we should send queries to.
         */
-       result = dns_view_find(
-               adb->view, adbname->name, rdtype, now, DNS_DBFIND_GLUEOK, true,
-               ((adbname->flags & DNS_ADBFIND_STARTATZONE) != 0), NULL, NULL,
-               fname, &rdataset, NULL);
+       result =
+               dns_view_find(adb->view, adbname->name, rdtype, now,
+                             DNS_DBFIND_GLUEOK | DNS_DBFIND_ADDITIONALOK, true,
+                             ((adbname->flags & DNS_ADBFIND_STARTATZONE) != 0),
+                             NULL, NULL, fname, &rdataset, NULL);
 
        switch (result) {
        case DNS_R_GLUE: