2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 05:57:52 +00:00

4042. [bug] zone.c:iszonesecure was being called too late.

[RT #38371]
This commit is contained in:
Mark Andrews 2015-01-21 13:18:30 +11:00
parent 83b9e799df
commit 22e3e00ac9
2 changed files with 8 additions and 8 deletions

View File

@ -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. 4041. [func] TCP sockets can now be shared while connecting.
(This will be used to enable client-side support (This will be used to enable client-side support
of pipelined queries.) [RT #38231] of pipelined queries.) [RT #38231]

View File

@ -2378,7 +2378,6 @@ setnsec3parameters(dns_db_t *db, rbtdb_version_t *version) {
unsigned int count, length; unsigned int count, length;
dns_rbtdb_t *rbtdb = (dns_rbtdb_t *)db; dns_rbtdb_t *rbtdb = (dns_rbtdb_t *)db;
RWLOCK(&rbtdb->tree_lock, isc_rwlocktype_read);
version->havensec3 = ISC_FALSE; version->havensec3 = ISC_FALSE;
node = rbtdb->origin_node; node = rbtdb->origin_node;
NODE_LOCK(&(rbtdb->node_locks[node->locknum].lock), NODE_LOCK(&(rbtdb->node_locks[node->locknum].lock),
@ -2455,7 +2454,6 @@ setnsec3parameters(dns_db_t *db, rbtdb_version_t *version) {
unlock: unlock:
NODE_UNLOCK(&(rbtdb->node_locks[node->locknum].lock), NODE_UNLOCK(&(rbtdb->node_locks[node->locknum].lock),
isc_rwlocktype_read); isc_rwlocktype_read);
RWUNLOCK(&rbtdb->tree_lock, isc_rwlocktype_read);
} }
static void static void
@ -2576,6 +2574,11 @@ closeversion(dns_db_t *db, dns_dbversion_t **versionp, isc_boolean_t commit) {
cleanup_version->changed_list, cleanup_version->changed_list,
link); link);
} }
/*
* Update the zone's secure status.
*/
if (!IS_CACHE(rbtdb))
iszonesecure(db, version, rbtdb->origin_node);
/* /*
* Become the current version. * 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; least_serial = rbtdb->least_serial;
RBTDB_UNLOCK(&rbtdb->lock, isc_rwlocktype_write); 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) { if (cleanup_version != NULL) {
INSIST(EMPTY(cleanup_version->changed_list)); INSIST(EMPTY(cleanup_version->changed_list));
isc_mem_put(rbtdb->common.mctx, cleanup_version, isc_mem_put(rbtdb->common.mctx, cleanup_version,