]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove node output from the database vtable
authorOndřej Surý <ondrej@isc.org>
Wed, 5 Aug 2026 14:26:13 +0000 (16:26 +0200)
committerAlessio Podda <alessio@isc.org>
Wed, 12 Aug 2026 19:57:34 +0000 (19:57 +0000)
Now that nodep is unused by all database implementations, remove it
from the signature of dns_dbmethods_t.find.

bin/named/builtin.c
bin/tests/system/dyndb/driver/db.c
lib/dns/db.c
lib/dns/include/dns/db.h
lib/dns/qpcache.c
lib/dns/qpzone.c
lib/dns/sdlz.c

index 49defd05ad651001efd186a3487949eb2a1107ac..3f4c35e83aa2859186c519272b794f346e3389fe 100644 (file)
@@ -857,7 +857,7 @@ findnode(dns_db_t *db, const dns_name_t *name, bool create,
 static isc_result_t
 builtin_find(dns_db_t *db, const dns_name_t *name, dns_dbversion_t *version,
             dns_rdatatype_t type, unsigned int options, isc_stdtime_t now,
-            dns_dbnode_t **nodep ISC_ATTR_UNUSED, dns_name_t *foundname,
+            dns_name_t *foundname,
             dns_clientinfomethods_t *methods ISC_ATTR_UNUSED,
             dns_clientinfo_t *clientinfo ISC_ATTR_UNUSED,
             dns_rdataset_t *rdataset,
index 562fe36df2d69e548aba799dd763930d3c7e864c..a6c02695997c4609dff0c9ed7e6c9406aea93bce 100644 (file)
@@ -319,21 +319,16 @@ findnode(dns_db_t *db, const dns_name_t *name, bool create,
 static isc_result_t
 find(dns_db_t *db, const dns_name_t *name, dns_dbversion_t *version,
      dns_rdatatype_t type, unsigned int options, isc_stdtime_t now,
-     dns_dbnode_t **nodep, dns_name_t *foundname,
-     dns_clientinfomethods_t *methods, dns_clientinfo_t *clientinfo,
-     dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset DNS__DB_FLARG) {
+     dns_name_t *foundname, dns_clientinfomethods_t *methods,
+     dns_clientinfo_t *clientinfo, dns_rdataset_t *rdataset,
+     dns_rdataset_t *sigrdataset DNS__DB_FLARG) {
        sampledb_t *sampledb = (sampledb_t *)db;
 
        REQUIRE(VALID_SAMPLEDB(sampledb));
 
-       if (sampledb->db->methods->find == NULL) {
-               return ISC_R_NOTIMPLEMENTED;
-       }
-
-       return (sampledb->db->methods->find)(sampledb->db, name, version, type,
-                                            options, now, nodep, foundname,
-                                            methods, clientinfo, rdataset,
-                                            sigrdataset DNS__DB_FLARG_PASS);
+       return dns__db_find(sampledb->db, name, version, type, options, now,
+                           foundname, methods, clientinfo, rdataset,
+                           sigrdataset DNS__DB_FLARG_PASS);
 }
 
 static isc_result_t
index 4fc87e25250edca01acd711a79477a3f18578d42..4ef78f335008e9ce3291d87994697c8033961222 100644 (file)
@@ -517,8 +517,8 @@ dns__db_find(dns_db_t *db, const dns_name_t *name, dns_dbversion_t *version,
 
        if (db->methods->find != NULL) {
                return (db->methods->find)(db, name, version, type, options,
-                                          now, NULL, foundname, methods,
-                                          clientinfo, rdataset,
+                                          now, foundname, methods, clientinfo,
+                                          rdataset,
                                           sigrdataset DNS__DB_FLARG_PASS);
        }
        return ISC_R_NOTIMPLEMENTED;
index 4569f210c9e49ba42b59e200d940b1362f2fd7ea..43d16003bec94b34436e1069b58246022437bc65 100644 (file)
@@ -152,7 +152,7 @@ typedef struct dns_db_methods {
        isc_result_t (*find)(dns_db_t *db, const dns_name_t *name,
                             dns_dbversion_t *version, dns_rdatatype_t type,
                             unsigned int options, isc_stdtime_t now,
-                            dns_dbnode_t **nodep, dns_name_t *foundname,
+                            dns_name_t                 *foundname,
                             dns_clientinfomethods_t    *methods,
                             dns_clientinfo_t           *clientinfo,
                             dns_rdataset_t             *rdataset,
index 783d4fc605f5adfea7d5f60b97de87d01c41d665..a0e033d9a2894301a7e97c1f0a9c619643016634 100644 (file)
@@ -1392,7 +1392,7 @@ qpc_search_deinit(qpc_search_t *search DNS__DB_FLARG) {
 static isc_result_t
 qpcache_find(dns_db_t *db, const dns_name_t *name, dns_dbversion_t *version,
             dns_rdatatype_t type, unsigned int options, isc_stdtime_t __now,
-            dns_dbnode_t **nodep ISC_ATTR_UNUSED, dns_name_t *foundname,
+            dns_name_t *foundname,
             dns_clientinfomethods_t *methods ISC_ATTR_UNUSED,
             dns_clientinfo_t *clientinfo ISC_ATTR_UNUSED,
             dns_rdataset_t *rdataset,
index 547db093bae8df07f7db804335b947f28a0bbb66..43de5890018d19add8fe5beb1f74f5fecca5bd8d 100644 (file)
@@ -3442,8 +3442,7 @@ qpz_search_init(qpz_search_t *search, qpzonedb_t *db, qpz_version_t *version,
 static isc_result_t
 qpzone_find(dns_db_t *db, const dns_name_t *name, dns_dbversion_t *version,
            dns_rdatatype_t type, unsigned int options,
-           isc_stdtime_t now ISC_ATTR_UNUSED,
-           dns_dbnode_t **nodep ISC_ATTR_UNUSED, dns_name_t *foundname,
+           isc_stdtime_t now ISC_ATTR_UNUSED, dns_name_t *foundname,
            dns_clientinfomethods_t *methods ISC_ATTR_UNUSED,
            dns_clientinfo_t *clientinfo ISC_ATTR_UNUSED,
            dns_rdataset_t *rdataset,
@@ -5209,7 +5208,7 @@ glue_nsdname_cb(void *arg, const dns_name_t *name, dns_rdatatype_t qtype,
        dns_rdataset_init(&sigrdataset_aaaa);
 
        result = qpzone_find(ctx->db, name, ctx->version, dns_rdatatype_a,
-                            DNS_DBFIND_GLUEOK, 0, NULL, name_a, NULL, NULL,
+                            DNS_DBFIND_GLUEOK, 0, name_a, NULL, NULL,
                             &rdataset_a, &sigrdataset_a DNS__DB_FLARG_PASS);
        if (result == DNS_R_GLUE) {
                glue = new_glue(ctx->db->mctx, name_a);
@@ -5226,7 +5225,7 @@ glue_nsdname_cb(void *arg, const dns_name_t *name, dns_rdatatype_t qtype,
        }
 
        result = qpzone_find(ctx->db, name, ctx->version, dns_rdatatype_aaaa,
-                            DNS_DBFIND_GLUEOK, 0, NULL, name_aaaa, NULL, NULL,
+                            DNS_DBFIND_GLUEOK, 0, name_aaaa, NULL, NULL,
                             &rdataset_aaaa,
                             &sigrdataset_aaaa DNS__DB_FLARG_PASS);
        if (result == DNS_R_GLUE) {
index cdd2f438c5a3e91646e448cedaec37d77269ecdd..d66792aca301649499fa8b5ea52841f23f0bb066 100644 (file)
@@ -765,9 +765,8 @@ findrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
 static isc_result_t
 sdlz_find(dns_db_t *db, const dns_name_t *name, dns_dbversion_t *version,
          dns_rdatatype_t type, unsigned int options, isc_stdtime_t now,
-         dns_dbnode_t **nodep ISC_ATTR_UNUSED, dns_name_t *foundname,
-         dns_clientinfomethods_t *methods, dns_clientinfo_t *clientinfo,
-         dns_rdataset_t *rdataset,
+         dns_name_t *foundname, dns_clientinfomethods_t *methods,
+         dns_clientinfo_t *clientinfo, dns_rdataset_t *rdataset,
          dns_rdataset_t *sigrdataset DNS__DB_FLARG) {
        dns_sdlz_db_t *sdlz = (dns_sdlz_db_t *)db;
        dns_dbnode_t *node = NULL;