From: Colin Vidal Date: Mon, 12 Jan 2026 08:23:01 +0000 (+0100) Subject: rename `dns_view_findzonecut()` into `dns_view_bestzonecut()` X-Git-Tag: v9.21.18~26^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8b0d4749c5082afa1a407b10e2abcb8de14afde;p=thirdparty%2Fbind9.git rename `dns_view_findzonecut()` into `dns_view_bestzonecut()` `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()`. --- diff --git a/bin/named/server.c b/bin/named/server.c index d79d36c0cf2..381997626b2 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -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( diff --git a/lib/dns/adb.c b/lib/dns/adb.c index d61f1ab4801..f5cfa7e58eb 100644 --- a/lib/dns/adb.c +++ b/lib/dns/adb.c @@ -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; diff --git a/lib/dns/include/dns/view.h b/lib/dns/include/dns/view.h index 033a1df74b0..ddf51e5f2f9 100644 --- a/lib/dns/include/dns/view.h +++ b/lib/dns/include/dns/view.h @@ -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); diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index 78f1599cfe8..6615158261d 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -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) { diff --git a/lib/dns/validator.c b/lib/dns/validator.c index ef94788c632..5316e9a6667 100644 --- a/lib/dns/validator.c +++ b/lib/dns/validator.c @@ -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)) { diff --git a/lib/dns/view.c b/lib/dns/view.c index d80f7220659..753b573d74d 100644 --- a/lib/dns/view.c +++ b/lib/dns/view.c @@ -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) {