From: Evan Hunt Date: Wed, 6 Mar 2024 23:34:39 +0000 (-0800) Subject: add a nodefullname implementation for the qpzone database X-Git-Tag: v9.19.22~4^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ac2c454f4f5f5e239c09181820e9a22626c087cd;p=thirdparty%2Fbind9.git add a nodefullname implementation for the qpzone database this enables the 'dyndb' system test to use a qpzone database. --- diff --git a/lib/dns/qpzone.c b/lib/dns/qpzone.c index bf0d1992088..4736c76ce98 100644 --- a/lib/dns/qpzone.c +++ b/lib/dns/qpzone.c @@ -5190,6 +5190,22 @@ deleterdataset(dns_db_t *db, dns_dbnode_t *dbnode, dns_dbversion_t *dbversion, return (result); } +static isc_result_t +nodefullname(dns_db_t *db, dns_dbnode_t *node, dns_name_t *name) { + qpzonedb_t *qpdb = (qpzonedb_t *)db; + qpdata_t *qpnode = (qpdata_t *)node; + isc_rwlocktype_t nlocktype = isc_rwlocktype_none; + + REQUIRE(VALID_QPZONE(qpdb)); + REQUIRE(node != NULL); + REQUIRE(name != NULL); + + NODE_RDLOCK(&qpdb->node_locks[qpnode->locknum].lock, &nlocktype); + dns_name_copy(qpnode->name, name); + NODE_UNLOCK(&qpdb->node_locks[qpnode->locknum].lock, &nlocktype); + return (ISC_R_SUCCESS); +} + static dns_glue_t * new_gluelist(isc_mem_t *mctx, dns_name_t *name) { dns_glue_t *glue = isc_mem_get(mctx, sizeof(*glue)); @@ -5519,6 +5535,7 @@ static dns_dbmethods_t qpdb_zonemethods = { .unlocknode = unlocknode, .addglue = addglue, .deletedata = deletedata, + .nodefullname = nodefullname, }; static void