diff --git a/lib/dns/qpzone.c b/lib/dns/qpzone.c index 8d012d2f25..2993d833c0 100644 --- a/lib/dns/qpzone.c +++ b/lib/dns/qpzone.c @@ -4679,6 +4679,9 @@ qpzone_createiterator(dns_db_t *db, unsigned int options, * The reason this is split from qpzone_addrdataset is to allow the reuse of * the same qp transaction for multiple adds. * + * If the rdataset is of type NSEC, 'nsec' must point to the qp trie for the + * zone, otherwise it must be NULL. + * * qpzone_subtractrdataset doesn't have the same problem since it cannot delete * nodes, only rdatasets. */ @@ -4746,9 +4749,9 @@ qpzone_addrdataset_inner(qpzonedb_t *qpdb, qpznode_t *node, } /* - * If we're adding a delegation type or adding NSEC records - * tree hold an exclusive lock on the tree. In the latter case the - * lock does not necessarily have to be acquired but it will help + * If we're adding a delegation type or adding to the auxiliary NSEC + * namespace, hold an exclusive lock on the tree. In the latter case + * the lock does not necessarily have to be acquired but it will help * purge ancient entries more effectively. * * (Note: node lock must be acquired after starting @@ -4810,7 +4813,8 @@ qpzone_addrdataset(dns_db_t *db, dns_dbnode_t *dbnode, REQUIRE(VALID_QPZONE(qpdb)); /* - * Open a new write transaction if we're adding an NSEC record. + * Open a new write transaction if we're adding to the auxiliary + * NSEC namespace. */ if (!node->havensec && rdataset->type == dns_rdatatype_nsec) { dns_qpmulti_write(qpdb->tree, &nsec); diff --git a/lib/dns/xfrin.c b/lib/dns/xfrin.c index 902abc34d9..3ecac75281 100644 --- a/lib/dns/xfrin.c +++ b/lib/dns/xfrin.c @@ -80,7 +80,13 @@ typedef enum { * Incoming zone transfer context. */ -typedef struct dns_ixfr dns_ixfr_t; +typedef struct dns_ixfr { + uint32_t diffs; + uint32_t maxdiffs; + uint32_t request_serial; + uint32_t current_serial; + dns_journal_t *journal; +} dns_ixfr_t; struct dns_xfrin { unsigned int magic; @@ -174,13 +180,7 @@ struct dns_xfrin { */ dns_rdatacallbacks_t axfr; - struct dns_ixfr { - uint32_t diffs; - uint32_t maxdiffs; - uint32_t request_serial; - uint32_t current_serial; - dns_journal_t *journal; - } ixfr; + dns_ixfr_t ixfr; dns_rdata_t firstsoa; unsigned char *firstsoa_data;