]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Use dns_view_findzone instead of dns_zt_find
authorMark Andrews <marka@isc.org>
Wed, 31 May 2023 06:13:29 +0000 (16:13 +1000)
committerOndřej Surý <ondrej@isc.org>
Thu, 1 Jun 2023 14:51:38 +0000 (16:51 +0200)
This ensures that rcu locking is properly applied for
view->zonetable.

bin/tests/system/dyndb/driver/syncptr.c
lib/dns/resolver.c
lib/ns/query.c

index 270c7acca6c3439edd14f11b9b5691c8fc14e1b8..4bbca88ce9519dde9c5e74bf5d7076f5856ed445 100644 (file)
@@ -166,7 +166,7 @@ syncptr_find_zone(sample_instance_t *inst, dns_rdata_t *rdata, dns_name_t *name,
        }
 
        /* Find a zone containing owner name of the PTR record. */
-       result = dns_zt_find(inst->view->zonetable, name, 0, zone);
+       result = dns_view_findzone(inst->view, name, 0, zone);
        if (result == DNS_R_PARTIALMATCH) {
                result = ISC_R_SUCCESS;
        } else if (result != ISC_R_SUCCESS) {
index e7e3c3914dc8da300acd372a184db6ba1c3b3eba..e4f98c769fa9d819f6c67e45f85facd2c93f49c4 100644 (file)
@@ -6593,7 +6593,7 @@ name_external(const dns_name_t *name, dns_rdatatype_t type, fetchctx_t *fctx) {
         * then don't cache.
         */
        dns_ztfind_t options = DNS_ZTFIND_NOEXACT | DNS_ZTFIND_MIRROR;
-       result = dns_zt_find(fctx->res->view->zonetable, name, options, &zone);
+       result = dns_view_findzone(fctx->res->view, name, options, &zone);
        if (result == ISC_R_SUCCESS || result == DNS_R_PARTIALMATCH) {
                dns_name_t *zname = dns_zone_getorigin(zone);
                dns_namereln_t reln = dns_name_fullcompare(
index 63479e9a6c3f1cf091b8abf7f6ad3ad199ceefbf..3d5752c8e5cd2d799817000d987edf44020f48c8 100644 (file)
@@ -1116,7 +1116,7 @@ query_getzonedb(ns_client_t *client, const dns_name_t *name,
                ztoptions |= DNS_ZTFIND_NOEXACT;
        }
 
-       result = dns_zt_find(client->view->zonetable, name, ztoptions, &zone);
+       result = dns_view_findzone(client->view, name, ztoptions, &zone);
 
        if (result == DNS_R_PARTIALMATCH) {
                partial = true;