diff --git a/CHANGES b/CHANGES index a85652202f..7a9255a541 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +4042. [bug] zone.c:iszonesecure was being called too late. + [RT #38371] + 4041. [func] TCP sockets can now be shared while connecting. (This will be used to enable client-side support of pipelined queries.) [RT #38231] diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c index a48bf25388..65228dca1f 100644 --- a/lib/dns/rbtdb.c +++ b/lib/dns/rbtdb.c @@ -2378,7 +2378,6 @@ setnsec3parameters(dns_db_t *db, rbtdb_version_t *version) { unsigned int count, length; dns_rbtdb_t *rbtdb = (dns_rbtdb_t *)db; - RWLOCK(&rbtdb->tree_lock, isc_rwlocktype_read); version->havensec3 = ISC_FALSE; node = rbtdb->origin_node; NODE_LOCK(&(rbtdb->node_locks[node->locknum].lock), @@ -2455,7 +2454,6 @@ setnsec3parameters(dns_db_t *db, rbtdb_version_t *version) { unlock: NODE_UNLOCK(&(rbtdb->node_locks[node->locknum].lock), isc_rwlocktype_read); - RWUNLOCK(&rbtdb->tree_lock, isc_rwlocktype_read); } static void @@ -2576,6 +2574,11 @@ closeversion(dns_db_t *db, dns_dbversion_t **versionp, isc_boolean_t commit) { cleanup_version->changed_list, link); } + /* + * Update the zone's secure status. + */ + if (!IS_CACHE(rbtdb)) + iszonesecure(db, version, rbtdb->origin_node); /* * Become the current version. */ @@ -2654,12 +2657,6 @@ closeversion(dns_db_t *db, dns_dbversion_t **versionp, isc_boolean_t commit) { least_serial = rbtdb->least_serial; RBTDB_UNLOCK(&rbtdb->lock, isc_rwlocktype_write); - /* - * Update the zone's secure status. - */ - if (writer && commit && !IS_CACHE(rbtdb)) - iszonesecure(db, version, rbtdb->origin_node); - if (cleanup_version != NULL) { INSIST(EMPTY(cleanup_version->changed_list)); isc_mem_put(rbtdb->common.mctx, cleanup_version,