]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
rename `dns_view_findzonecut()` into `dns_view_bestzonecut()`
authorColin Vidal <colin@isc.org>
Mon, 12 Jan 2026 08:23:01 +0000 (09:23 +0100)
committerColin Vidal <colin@isc.org>
Fri, 16 Jan 2026 06:52:56 +0000 (07:52 +0100)
`dns_view_findzonecut()` is used only in the context where the closest
name servers for a name need to be queried.  In the future, this API
will also return the glues (if known) for those name servers, as well
as (exclusively, if both NS and DELEG exist) the DELEG record.

To avoid ambiguities with other code flows using `dns_db_findzonecut()`,
`dns_view_findzonecut()` has been renamed into `dns_view_bestzonecut()`.

bin/named/server.c
lib/dns/adb.c
lib/dns/include/dns/view.h
lib/dns/resolver.c
lib/dns/validator.c
lib/dns/view.c

index d79d36c0cf27bf17c1746e3492ecbed5f0df3981..381997626b27b692df53da1658032e2187d35f77 100644 (file)
@@ -6590,7 +6590,7 @@ tat_send(void *arg) {
         */
        domain = dns_fixedname_initname(&fdomain);
        dns_rdataset_init(&nameservers);
-       result = dns_view_findzonecut(tat->view, keyname, domain, NULL, 0, 0,
+       result = dns_view_bestzonecut(tat->view, keyname, domain, NULL, 0, 0,
                                      true, true, &nameservers);
        if (result == ISC_R_SUCCESS) {
                result = dns_resolver_createfetch(
index d61f1ab4801d390bcee5c3e54393ea63ba161553..f5cfa7e58eb7c3d331d2543cda2b421e59168640 100644 (file)
@@ -2738,7 +2738,7 @@ fetch_name(dns_adbname_t *adbname, bool start_at_zone, bool no_validation,
                DP(ENTER_LEVEL, "fetch_name: starting at zone for name %p",
                   adbname);
                name = dns_fixedname_initname(&fixed);
-               CHECK(dns_view_findzonecut(adb->view, adbname->name, name, NULL,
+               CHECK(dns_view_bestzonecut(adb->view, adbname->name, name, NULL,
                                           0, 0, true, false, &rdataset));
                nameservers = &rdataset;
                options |= DNS_FETCHOPT_UNSHARED;
index 033a1df74b0bfd571c58b94c53ce9452ca007453..ddf51e5f2f9a3f3069921d77cafc71c5a4c7cb9e 100644 (file)
@@ -684,7 +684,7 @@ dns_view_simplefind(dns_view_t *view, const dns_name_t *name,
  */
 
 isc_result_t
-dns_view_findzonecut(dns_view_t *view, const dns_name_t *name,
+dns_view_bestzonecut(dns_view_t *view, const dns_name_t *name,
                     dns_name_t *fname, dns_name_t *dcname, isc_stdtime_t now,
                     unsigned int options, bool use_hints, bool use_cache,
                     dns_rdataset_t *rdataset);
index 78f1599cfe8d232aef6453f759d5073aefce5cad..6615158261ddf9cb7c6f293b0bcf61dc18b75b5c 100644 (file)
@@ -4496,7 +4496,7 @@ resume_qmin(void *arg) {
        if (dns_rdatatype_atparent(fctx->type)) {
                findoptions |= DNS_DBFIND_NOEXACT;
        }
-       result = dns_view_findzonecut(res->view, fctx->name, fname, dcname,
+       result = dns_view_bestzonecut(res->view, fctx->name, fname, dcname,
                                      fctx->now, findoptions, true, true,
                                      &fctx->nameservers);
        FCTXTRACEN("resume_qmin findzonecut", fname, result);
@@ -4943,7 +4943,7 @@ fctx__create(dns_resolver_t *res, isc_loop_t *loop, const dns_name_t *name,
                        if (dns_rdatatype_atparent(fctx->type)) {
                                findoptions |= DNS_DBFIND_NOEXACT;
                        }
-                       result = dns_view_findzonecut(
+                       result = dns_view_bestzonecut(
                                res->view, name, fctx->fwdname, dcname,
                                fctx->now, findoptions, true, true,
                                &fctx->nameservers);
@@ -9219,7 +9219,7 @@ rctx_nextserver(respctx_t *rctx, dns_message_t *message,
                } else {
                        name = fctx->domain;
                }
-               result = dns_view_findzonecut(fctx->res->view, name, fname,
+               result = dns_view_bestzonecut(fctx->res->view, name, fname,
                                              dcname, fctx->now, findoptions,
                                              true, true, &fctx->nameservers);
                if (result != ISC_R_SUCCESS) {
index ef94788c632fdcd62e49324797745ba61106a6c7..5316e9a66674b393e15f0b2f05079ce7d8c594eb 100644 (file)
@@ -3234,7 +3234,7 @@ seek_ds(dns_validator_t *val, isc_result_t *resp) {
                 */
                if (result == DNS_R_NXRRSET &&
                    !dns_rdataset_isassociated(&val->frdataset) &&
-                   dns_view_findzonecut(val->view, tname, found, NULL, 0, 0,
+                   dns_view_bestzonecut(val->view, tname, found, NULL, 0, 0,
                                         false, false, NULL) == ISC_R_SUCCESS &&
                    dns_name_equal(tname, found))
                {
index d80f722065991324351707266524d961c76eee4f..753b573d74d6f9a915af38c63ef313e8f66cc671 100644 (file)
@@ -1134,7 +1134,7 @@ findzonecut_hints(dns_view_t *view, dns_name_t *fname, dns_name_t *dcname,
 }
 
 isc_result_t
-dns_view_findzonecut(dns_view_t *view, const dns_name_t *name,
+dns_view_bestzonecut(dns_view_t *view, const dns_name_t *name,
                     dns_name_t *fname, dns_name_t *dcname, isc_stdtime_t now,
                     unsigned int options, bool usehints, bool usecache,
                     dns_rdataset_t *rdataset) {