diff --git a/fuzz/dns_qpkey_name.c b/fuzz/dns_qpkey_name.c index 125df9399f..c66eba8ea8 100644 --- a/fuzz/dns_qpkey_name.c +++ b/fuzz/dns_qpkey_name.c @@ -56,16 +56,17 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { CHECK(dns_name_fromwire(namein, &buf, DNS_DECOMPRESS_NEVER, NULL)); /* verify round-trip conversion of first name */ - size_t keylen = dns_qpkey_fromname(key, namein, 0); + size_t keylen = dns_qpkey_fromname(key, namein, DNS_DBNAMESPACE_NORMAL); dns_qpkey_toname(key, keylen, nameout, &space); assert(dns_name_equal(namein, nameout)); - assert(space == 0); + assert(space == DNS_DBNAMESPACE_NORMAL); /* is there a second name? */ CHECK(dns_name_fromwire(namecmp, &buf, DNS_DECOMPRESS_NEVER, NULL)); - size_t cmplen = dns_qpkey_fromname(cmp, namecmp, 0); + size_t cmplen = dns_qpkey_fromname(cmp, namecmp, + DNS_DBNAMESPACE_NORMAL); size_t len = ISC_MIN(keylen, cmplen); int namerel = dns_name_compare(namein, namecmp); @@ -74,7 +75,7 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { assert((namerel < 0) == (keyrel < 0)); assert((namerel == 0) == (keyrel == 0)); assert((namerel > 0) == (keyrel > 0)); - assert(space == 0); + assert(space == DNS_DBNAMESPACE_NORMAL); return 0; } diff --git a/lib/dns/forward.c b/lib/dns/forward.c index 9defcadeda..aa2ba37016 100644 --- a/lib/dns/forward.c +++ b/lib/dns/forward.c @@ -163,7 +163,8 @@ dns_fwdtable_find(dns_fwdtable_t *fwdtable, const dns_name_t *name, REQUIRE(VALID_FWDTABLE(fwdtable)); dns_qpmulti_query(fwdtable->table, &qpr); - result = dns_qp_lookup(&qpr, name, 0, NULL, NULL, NULL, &pval, NULL); + result = dns_qp_lookup(&qpr, name, DNS_DBNAMESPACE_NORMAL, NULL, NULL, + NULL, &pval, NULL); if (result == ISC_R_SUCCESS || result == DNS_R_PARTIALMATCH) { dns_forwarders_t *fwdrs = pval; *forwardersp = fwdrs; @@ -233,7 +234,7 @@ static size_t qp_makekey(dns_qpkey_t key, void *uctx ISC_ATTR_UNUSED, void *pval, uint32_t ival ISC_ATTR_UNUSED) { dns_forwarders_t *fwd = pval; - return dns_qpkey_fromname(key, &fwd->name, 0); + return dns_qpkey_fromname(key, &fwd->name, DNS_DBNAMESPACE_NORMAL); } static void diff --git a/lib/dns/include/dns/db.h b/lib/dns/include/dns/db.h index d38aac0958..f04253dff7 100644 --- a/lib/dns/include/dns/db.h +++ b/lib/dns/include/dns/db.h @@ -238,9 +238,9 @@ struct dns_dbonupdatelistener { * the beginning of the key, converting them to '0', '1', and '2'. */ typedef enum { - DNS_DB_NSEC_NORMAL = 0, /* regular namespace */ - DNS_DB_NSEC_NSEC = 1, /* nsec namespace */ - DNS_DB_NSEC_NSEC3 = 2, /* nsec3 namespace */ + DNS_DBNAMESPACE_NORMAL = 0, /* regular namespace */ + DNS_DBNAMESPACE_NSEC = 1, /* nsec namespace */ + DNS_DBNAMESPACE_NSEC3 = 2, /* nsec3 namespace */ } dns_namespace_t; /*@{*/ diff --git a/lib/dns/include/dns/qp.h b/lib/dns/include/dns/qp.h index 077a4d508a..456cf635a2 100644 --- a/lib/dns/include/dns/qp.h +++ b/lib/dns/include/dns/qp.h @@ -477,11 +477,7 @@ size_t dns_qpkey_fromname(dns_qpkey_t key, const dns_name_t *name, dns_namespace_t space); /*%< - * Convert a DNS name into a trie lookup key. - * - * If 'space' is DNS_DB_NSEC_NORMAL (0), convert the name for a normal lookup. - * If 'space' is DNS_DB_NSEC_NSEC, convert the name for a NSEC lookup. - * If 'space' is DNS_DB_NSEC_NSEC3, convert the name for a NSEC3 lookup. + * Convert a DNS name into a trie lookup key in the right namespace. * * Requires: * \li `name` is a pointer to a valid `dns_name_t` @@ -549,8 +545,7 @@ dns_qp_lookup(dns_qpreadable_t qpr, const dns_name_t *name, dns_qpchain_t *chain, void **pval_r, uint32_t *ival_r); /*%< * Look up a leaf in a qp-trie that is equal to, or an ancestor domain of, - * 'name' in the namespace 'space'. The namespace can either be - * DNS_DB_NSEC_NORMAL, DNS_DB_NSEC_NSEC, or DNS_DB_NSEC3. + * 'name' in the namespace 'space'. * * If 'foundname' is not NULL, it will be updated to contain the name * that was found (if any). The return code, ISC_R_SUCCESS or diff --git a/lib/dns/keytable.c b/lib/dns/keytable.c index 5175b90884..018b4f73e0 100644 --- a/lib/dns/keytable.c +++ b/lib/dns/keytable.c @@ -273,7 +273,8 @@ delete_ds(dns_qp_t *qp, dns_keytable_t *keytable, dns_keynode_t *knode, } } - result = dns_qp_deletename(qp, &knode->name, 0, &pval, NULL); + result = dns_qp_deletename(qp, &knode->name, DNS_DBNAMESPACE_NORMAL, + &pval, NULL); INSIST(result == ISC_R_SUCCESS); INSIST(pval == knode); @@ -343,7 +344,8 @@ insert(dns_keytable_t *keytable, bool managed, bool initial, dns_qpmulti_write(keytable->table, &qp); - result = dns_qp_getname(qp, keyname, 0, &pval, NULL); + result = dns_qp_getname(qp, keyname, DNS_DBNAMESPACE_NORMAL, &pval, + NULL); if (result != ISC_R_SUCCESS) { /* * There was no match for "keyname" in "keytable" yet, so one @@ -400,7 +402,8 @@ dns_keytable_delete(dns_keytable_t *keytable, const dns_name_t *keyname, REQUIRE(keyname != NULL); dns_qpmulti_write(keytable->table, &qp); - result = dns_qp_deletename(qp, keyname, 0, &pval, NULL); + result = dns_qp_deletename(qp, keyname, DNS_DBNAMESPACE_NORMAL, &pval, + NULL); if (result == ISC_R_SUCCESS) { dns_keynode_t *n = pval; if (callback != NULL) { @@ -430,7 +433,8 @@ dns_keytable_deletekey(dns_keytable_t *keytable, const dns_name_t *keyname, REQUIRE(dnskey != NULL); dns_qpmulti_write(keytable->table, &qp); - result = dns_qp_getname(qp, keyname, 0, &pval, NULL); + result = dns_qp_getname(qp, keyname, DNS_DBNAMESPACE_NORMAL, &pval, + NULL); if (result != ISC_R_SUCCESS) { goto finish; } @@ -479,7 +483,8 @@ dns_keytable_find(dns_keytable_t *keytable, const dns_name_t *keyname, REQUIRE(keynodep != NULL && *keynodep == NULL); dns_qpmulti_query(keytable->table, &qpr); - result = dns_qp_getname(&qpr, keyname, 0, &pval, NULL); + result = dns_qp_getname(&qpr, keyname, DNS_DBNAMESPACE_NORMAL, &pval, + NULL); if (result == ISC_R_SUCCESS) { dns_keynode_t *knode = pval; dns_keynode_attach(knode, keynodep); @@ -506,7 +511,8 @@ dns_keytable_finddeepestmatch(dns_keytable_t *keytable, const dns_name_t *name, REQUIRE(foundname != NULL); dns_qpmulti_query(keytable->table, &qpr); - result = dns_qp_lookup(&qpr, name, 0, NULL, NULL, NULL, &pval, NULL); + result = dns_qp_lookup(&qpr, name, DNS_DBNAMESPACE_NORMAL, NULL, NULL, + NULL, &pval, NULL); keynode = pval; if (result == ISC_R_SUCCESS || result == DNS_R_PARTIALMATCH) { @@ -535,7 +541,8 @@ dns_keytable_issecuredomain(dns_keytable_t *keytable, const dns_name_t *name, REQUIRE(wantdnssecp != NULL); dns_qpmulti_query(keytable->table, &qpr); - result = dns_qp_lookup(&qpr, name, 0, NULL, NULL, NULL, &pval, NULL); + result = dns_qp_lookup(&qpr, name, DNS_DBNAMESPACE_NORMAL, NULL, NULL, + NULL, &pval, NULL); if (result == ISC_R_SUCCESS || result == DNS_R_PARTIALMATCH) { keynode = pval; if (foundname != NULL) { @@ -830,7 +837,7 @@ static size_t qp_makekey(dns_qpkey_t key, void *uctx ISC_ATTR_UNUSED, void *pval, uint32_t ival ISC_ATTR_UNUSED) { dns_keynode_t *keynode = pval; - return dns_qpkey_fromname(key, &keynode->name, 0); + return dns_qpkey_fromname(key, &keynode->name, DNS_DBNAMESPACE_NORMAL); } static void diff --git a/lib/dns/nametree.c b/lib/dns/nametree.c index 03aad3408b..7d67bd0c1c 100644 --- a/lib/dns/nametree.c +++ b/lib/dns/nametree.c @@ -164,14 +164,16 @@ dns_nametree_add(dns_nametree_t *nametree, const dns_name_t *name, case DNS_NAMETREE_COUNT: new = newnode(nametree->mctx, name); new->set = true; - result = dns_qp_deletename(qp, name, 0, (void **)&old, &count); + result = dns_qp_deletename(qp, name, DNS_DBNAMESPACE_NORMAL, + (void **)&old, &count); if (result == ISC_R_SUCCESS) { count += 1; } break; case DNS_NAMETREE_BITS: - result = dns_qp_getname(qp, name, 0, (void **)&old, NULL); + result = dns_qp_getname(qp, name, DNS_DBNAMESPACE_NORMAL, + (void **)&old, NULL); if (result == ISC_R_SUCCESS && matchbit(old->bits, value)) { goto out; } @@ -187,7 +189,8 @@ dns_nametree_add(dns_nametree_t *nametree, const dns_name_t *name, new->bits = isc_mem_cget(nametree->mctx, size, sizeof(char)); if (result == ISC_R_SUCCESS) { memmove(new->bits, old->bits, old->bits[0]); - result = dns_qp_deletename(qp, name, 0, NULL, NULL); + result = dns_qp_deletename( + qp, name, DNS_DBNAMESPACE_NORMAL, NULL, NULL); INSIST(result == ISC_R_SUCCESS); } @@ -222,7 +225,8 @@ dns_nametree_delete(dns_nametree_t *nametree, const dns_name_t *name) { REQUIRE(name != NULL); dns_qpmulti_write(nametree->table, &qp); - result = dns_qp_deletename(qp, name, 0, (void **)&old, &count); + result = dns_qp_deletename(qp, name, DNS_DBNAMESPACE_NORMAL, + (void **)&old, &count); switch (nametree->type) { case DNS_NAMETREE_BOOL: case DNS_NAMETREE_BITS: @@ -258,7 +262,8 @@ dns_nametree_find(dns_nametree_t *nametree, const dns_name_t *name, REQUIRE(ntnodep != NULL && *ntnodep == NULL); dns_qpmulti_query(nametree->table, &qpr); - result = dns_qp_getname(&qpr, name, 0, (void **)&node, NULL); + result = dns_qp_getname(&qpr, name, DNS_DBNAMESPACE_NORMAL, + (void **)&node, NULL); if (result == ISC_R_SUCCESS) { dns_ntnode_attach(node, ntnodep); } @@ -278,8 +283,8 @@ dns_nametree_covered(dns_nametree_t *nametree, const dns_name_t *name, REQUIRE(VALID_NAMETREE(nametree)); dns_qpmulti_query(nametree->table, &qpr); - result = dns_qp_lookup(&qpr, name, 0, NULL, NULL, NULL, (void **)&node, - NULL); + result = dns_qp_lookup(&qpr, name, DNS_DBNAMESPACE_NORMAL, NULL, NULL, + NULL, (void **)&node, NULL); if (result == ISC_R_SUCCESS || result == DNS_R_PARTIALMATCH) { if (found != NULL) { dns_name_copy(&node->name, found); @@ -319,7 +324,7 @@ static size_t qp_makekey(dns_qpkey_t key, void *uctx ISC_ATTR_UNUSED, void *pval, uint32_t ival ISC_ATTR_UNUSED) { dns_ntnode_t *ntnode = pval; - return dns_qpkey_fromname(key, &ntnode->name, 0); + return dns_qpkey_fromname(key, &ntnode->name, DNS_DBNAMESPACE_NORMAL); } static void diff --git a/lib/dns/nta.c b/lib/dns/nta.c index c7705fd2f9..39f7de3456 100644 --- a/lib/dns/nta.c +++ b/lib/dns/nta.c @@ -316,7 +316,8 @@ dns_ntatable_add(dns_ntatable_t *ntatable, const dns_name_t *name, bool force, result = dns_qp_insert(qp, nta, 0); switch (result) { case ISC_R_EXISTS: - result = dns_qp_getname(qp, &nta->name, 0, &pval, NULL); + result = dns_qp_getname(qp, &nta->name, DNS_DBNAMESPACE_NORMAL, + &pval, NULL); if (result == ISC_R_SUCCESS) { /* * an NTA already existed: throw away the @@ -355,7 +356,8 @@ dns_ntatable_delete(dns_ntatable_t *ntatable, const dns_name_t *name) { REQUIRE(name != NULL); dns_qpmulti_write(ntatable->table, &qp); - result = dns_qp_deletename(qp, name, 0, &pval, NULL); + result = dns_qp_deletename(qp, name, DNS_DBNAMESPACE_NORMAL, &pval, + NULL); if (result == ISC_R_SUCCESS) { dns__nta_t *n = pval; dns__nta_shutdown(n); @@ -379,7 +381,8 @@ delete_expired(void *arg) { RWLOCK(&ntatable->rwlock, isc_rwlocktype_write); dns_qpmulti_write(ntatable->table, &qp); - result = dns_qp_getname(qp, &nta->name, 0, &pval, NULL); + result = dns_qp_getname(qp, &nta->name, DNS_DBNAMESPACE_NORMAL, &pval, + NULL); if (result == ISC_R_SUCCESS && ((dns__nta_t *)pval)->expiry == nta->expiry && !nta->shuttingdown) { @@ -387,7 +390,8 @@ delete_expired(void *arg) { dns_name_format(&nta->name, nb, sizeof(nb)); isc_log_write(DNS_LOGCATEGORY_DNSSEC, DNS_LOGMODULE_NTA, ISC_LOG_INFO, "deleting expired NTA at %s", nb); - dns_qp_deletename(qp, &nta->name, 0, NULL, NULL); + dns_qp_deletename(qp, &nta->name, DNS_DBNAMESPACE_NORMAL, NULL, + NULL); dns__nta_shutdown(nta); dns__nta_unref(nta); } @@ -412,7 +416,8 @@ dns_ntatable_covered(dns_ntatable_t *ntatable, isc_stdtime_t now, RWLOCK(&ntatable->rwlock, isc_rwlocktype_read); dns_qpmulti_query(ntatable->table, &qpr); - result = dns_qp_lookup(&qpr, name, 0, NULL, NULL, NULL, &pval, NULL); + result = dns_qp_lookup(&qpr, name, DNS_DBNAMESPACE_NORMAL, NULL, NULL, + NULL, &pval, NULL); nta = pval; switch (result) { @@ -649,7 +654,7 @@ static size_t qp_makekey(dns_qpkey_t key, void *uctx ISC_ATTR_UNUSED, void *pval, uint32_t ival ISC_ATTR_UNUSED) { dns__nta_t *nta = pval; - return dns_qpkey_fromname(key, &nta->name, 0); + return dns_qpkey_fromname(key, &nta->name, DNS_DBNAMESPACE_NORMAL); } static void diff --git a/lib/dns/qpcache.c b/lib/dns/qpcache.c index 06196d39d7..8645a114eb 100644 --- a/lib/dns/qpcache.c +++ b/lib/dns/qpcache.c @@ -604,14 +604,14 @@ delete_node(qpcache_t *qpdb, qpcnode_t *node) { } switch (node->nspace) { - case DNS_DB_NSEC_NORMAL: + case DNS_DBNAMESPACE_NORMAL: if (node->havensec) { /* * Delete the corresponding node from the auxiliary NSEC * tree before deleting from the main tree. */ result = dns_qp_deletename(qpdb->nsec, &node->name, - DNS_DB_NSEC_NSEC, NULL, + DNS_DBNAMESPACE_NSEC, NULL, NULL); if (result != ISC_R_SUCCESS) { isc_log_write(DNS_LOGCATEGORY_DATABASE, @@ -625,7 +625,7 @@ delete_node(qpcache_t *qpdb, qpcnode_t *node) { result = dns_qp_deletename(qpdb->tree, &node->name, node->nspace, NULL, NULL); break; - case DNS_DB_NSEC_NSEC: + case DNS_DBNAMESPACE_NSEC: result = dns_qp_deletename(qpdb->nsec, &node->name, node->nspace, NULL, NULL); break; @@ -1395,8 +1395,8 @@ find_coveringnsec(qpc_search_t *search, const dns_name_t *name, /* * Look for the node in the auxilary tree. */ - result = dns_qp_lookup(search->qpdb->nsec, name, DNS_DB_NSEC_NSEC, NULL, - &iter, NULL, (void **)&node, NULL); + result = dns_qp_lookup(search->qpdb->nsec, name, DNS_DBNAMESPACE_NSEC, + NULL, &iter, NULL, (void **)&node, NULL); if (result != DNS_R_PARTIALMATCH) { return ISC_R_NOTFOUND; } @@ -1417,7 +1417,7 @@ find_coveringnsec(qpc_search_t *search, const dns_name_t *name, */ node = NULL; result = dns_qp_getname(search->qpdb->tree, predecessor, - DNS_DB_NSEC_NORMAL, (void **)&node, NULL); + DNS_DBNAMESPACE_NORMAL, (void **)&node, NULL); if (result != ISC_R_SUCCESS) { return result; } @@ -1524,8 +1524,8 @@ qpcache_find(dns_db_t *db, const dns_name_t *name, dns_dbversion_t *version, /* * Search down from the root of the tree. */ - result = dns_qp_lookup(search.qpdb->tree, name, 0, NULL, NULL, - &search.chain, (void **)&node, NULL); + result = dns_qp_lookup(search.qpdb->tree, name, DNS_DBNAMESPACE_NORMAL, + NULL, NULL, &search.chain, (void **)&node, NULL); if (result != ISC_R_NOTFOUND && foundname != NULL) { dns_name_copy(&node->name, foundname); } @@ -1964,8 +1964,8 @@ qpcache_findzonecut(dns_db_t *db, const dns_name_t *name, unsigned int options, /* * Search down from the root of the tree. */ - result = dns_qp_lookup(search.qpdb->tree, name, 0, NULL, NULL, - &search.chain, (void **)&node, NULL); + result = dns_qp_lookup(search.qpdb->tree, name, DNS_DBNAMESPACE_NORMAL, + NULL, NULL, &search.chain, (void **)&node, NULL); switch (result) { case ISC_R_SUCCESS: @@ -2352,7 +2352,7 @@ qpcache_findnode(dns_db_t *db, const dns_name_t *name, bool create, qpcnode_t *node = NULL; isc_result_t result; isc_rwlocktype_t tlocktype = isc_rwlocktype_none; - dns_namespace_t dopt = DNS_DB_NSEC_NORMAL; + dns_namespace_t nspace = DNS_DBNAMESPACE_NORMAL; TREE_RDLOCK(&qpdb->tree_lock, &tlocktype); result = dns_qp_getname(qpdb->tree, name, nspace, (void **)&node, NULL); @@ -2368,7 +2368,7 @@ qpcache_findnode(dns_db_t *db, const dns_name_t *name, bool create, (void **)&node, NULL); if (result != ISC_R_SUCCESS) { node = new_qpcnode(qpdb, name); - node->nspace = dopt; + node->nspace = nspace; result = dns_qp_insert(qpdb->tree, node, 0); INSIST(result == ISC_R_SUCCESS); qpcnode_unref(node); @@ -3045,12 +3045,12 @@ qpcache_addrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version, if (newnsec && !qpnode->havensec) { qpcnode_t *nsecnode = NULL; - result = dns_qp_getname(qpdb->nsec, name, DNS_DB_NSEC_NSEC, + result = dns_qp_getname(qpdb->nsec, name, DNS_DBNAMESPACE_NSEC, (void **)&nsecnode, NULL); if (result != ISC_R_SUCCESS) { INSIST(nsecnode == NULL); nsecnode = new_qpcnode(qpdb, name); - nsecnode->nspace = DNS_DB_NSEC_NSEC; + nsecnode->nspace = DNS_DBNAMESPACE_NSEC; result = dns_qp_insert(qpdb->nsec, nsecnode, 0); INSIST(result == ISC_R_SUCCESS); qpcnode_detach(&nsecnode); @@ -3427,7 +3427,8 @@ resume_iteration(qpc_dbit_t *qpdbiter, bool continuing) { */ if (continuing && qpdbiter->node != NULL) { isc_result_t result; - result = dns_qp_lookup(qpdb->tree, qpdbiter->name, 0, NULL, + result = dns_qp_lookup(qpdb->tree, qpdbiter->name, + DNS_DBNAMESPACE_NORMAL, NULL, &qpdbiter->iter, NULL, NULL, NULL); INSIST(result == ISC_R_SUCCESS); } @@ -3555,8 +3556,9 @@ dbiterator_seek(dns_dbiterator_t *iterator, dereference_iter_node(qpdbiter DNS__DB_FLARG_PASS); - result = dns_qp_lookup(qpdb->tree, name, 0, NULL, &qpdbiter->iter, NULL, - (void **)&qpdbiter->node, NULL); + result = dns_qp_lookup(qpdb->tree, name, DNS_DBNAMESPACE_NORMAL, NULL, + &qpdbiter->iter, NULL, (void **)&qpdbiter->node, + NULL); if (result == ISC_R_SUCCESS || result == DNS_R_PARTIALMATCH) { dns_name_copy(&qpdbiter->node->name, qpdbiter->name); diff --git a/lib/dns/qpzone.c b/lib/dns/qpzone.c index 99cd54e058..93caeb3d52 100644 --- a/lib/dns/qpzone.c +++ b/lib/dns/qpzone.c @@ -767,7 +767,7 @@ dns__qpzone_create(isc_mem_t *mctx, const dns_name_t *origin, dns_dbtype_t type, * we simply remember the node data's address. */ qpdb->origin = new_qpznode(qpdb, &qpdb->common.origin); - qpdb->origin->nspace = DNS_DB_NSEC_NORMAL; + qpdb->origin->nspace = DNS_DBNAMESPACE_NORMAL; result = dns_qp_insert(qp, qpdb->origin, 0); INSIST(result == ISC_R_SUCCESS); @@ -776,7 +776,7 @@ dns__qpzone_create(isc_mem_t *mctx, const dns_name_t *origin, dns_dbtype_t type, * the NSEC nodes while iterating over the full tree. */ qpdb->nsec_origin = new_qpznode(qpdb, &qpdb->common.origin); - qpdb->nsec_origin->nspace = DNS_DB_NSEC_NSEC; + qpdb->nsec_origin->nspace = DNS_DBNAMESPACE_NSEC; result = dns_qp_insert(qp, qpdb->nsec_origin, 0); INSIST(result == ISC_R_SUCCESS); @@ -786,7 +786,7 @@ dns__qpzone_create(isc_mem_t *mctx, const dns_name_t *origin, dns_dbtype_t type, * record in the tree. */ qpdb->nsec3_origin = new_qpznode(qpdb, &qpdb->common.origin); - qpdb->nsec3_origin->nspace = DNS_DB_NSEC_NSEC3; + qpdb->nsec3_origin->nspace = DNS_DBNAMESPACE_NSEC3; result = dns_qp_insert(qp, qpdb->nsec3_origin, 0); INSIST(result == ISC_R_SUCCESS); @@ -1712,13 +1712,14 @@ loading_addnode(qpz_load_t *loadctx, const dns_name_t *name, qpznode_t *node = NULL, *nsecnode = NULL; if (type == dns_rdatatype_nsec3 || covers == dns_rdatatype_nsec3) { - result = dns_qp_getname(loadctx->tree, name, DNS_DB_NSEC_NSEC3, - (void **)&node, NULL); + result = dns_qp_getname(loadctx->tree, name, + DNS_DBNAMESPACE_NSEC3, (void **)&node, + NULL); if (result == ISC_R_SUCCESS) { *nodep = node; } else { node = new_qpznode(qpdb, name); - node->nspace = DNS_DB_NSEC_NSEC3; + node->nspace = DNS_DBNAMESPACE_NSEC3; result = dns_qp_insert(loadctx->tree, node, 0); INSIST(result == ISC_R_SUCCESS); *nodep = node; @@ -1727,7 +1728,7 @@ loading_addnode(qpz_load_t *loadctx, const dns_name_t *name, return; } - result = dns_qp_getname(loadctx->tree, name, DNS_DB_NSEC_NORMAL, + result = dns_qp_getname(loadctx->tree, name, DNS_DBNAMESPACE_NORMAL, (void **)&node, NULL); if (result == ISC_R_SUCCESS) { if (type == dns_rdatatype_nsec && node->havensec) { @@ -1736,7 +1737,7 @@ loading_addnode(qpz_load_t *loadctx, const dns_name_t *name, } else { INSIST(node == NULL); node = new_qpznode(qpdb, name); - node->nspace = DNS_DB_NSEC_NORMAL; + node->nspace = DNS_DBNAMESPACE_NORMAL; result = dns_qp_insert(loadctx->tree, node, 0); INSIST(result == ISC_R_SUCCESS); qpznode_unref(node); @@ -1755,7 +1756,7 @@ loading_addnode(qpz_load_t *loadctx, const dns_name_t *name, */ node->havensec = true; nsecnode = new_qpznode(qpdb, name); - nsecnode->nspace = DNS_DB_NSEC_NSEC; + nsecnode->nspace = DNS_DBNAMESPACE_NSEC; (void)dns_qp_insert(loadctx->tree, nsecnode, 0); qpznode_detach(&nsecnode); @@ -2192,7 +2193,7 @@ loading_addrdataset(void *arg, const dns_name_t *name, if (rdataset->type != dns_rdatatype_nsec3 && rdataset->covers != dns_rdatatype_nsec3) { - addwildcards(qpdb, loadctx->tree, name, DNS_DB_NSEC_NORMAL); + addwildcards(qpdb, loadctx->tree, name, DNS_DBNAMESPACE_NORMAL); } if (dns_name_iswildcard(name)) { @@ -2210,7 +2211,8 @@ loading_addrdataset(void *arg, const dns_name_t *name, return DNS_R_INVALIDNSEC3; } - wildcardmagic(qpdb, loadctx->tree, name, DNS_DB_NSEC_NORMAL); + wildcardmagic(qpdb, loadctx->tree, name, + DNS_DBNAMESPACE_NORMAL); } loading_addnode(loadctx, name, rdataset->type, rdataset->covers, &node); @@ -2548,7 +2550,8 @@ findnodeintree(qpzonedb_t *qpdb, const dns_name_t *name, bool create, bool nsec3, dns_dbnode_t **nodep DNS__DB_FLARG) { isc_result_t result; qpznode_t *node = NULL; - dns_namespace_t nspace = nsec3 ? DNS_DB_NSEC_NSEC3 : DNS_DB_NSEC_NORMAL; + dns_namespace_t nspace = nsec3 ? DNS_DBNAMESPACE_NSEC3 + : DNS_DBNAMESPACE_NORMAL; dns_qpread_t qpr = { 0 }; dns_qp_t *qp = NULL; @@ -2580,7 +2583,7 @@ findnodeintree(qpzonedb_t *qpdb, const dns_name_t *name, bool create, } } - INSIST(node->nspace == DNS_DB_NSEC_NSEC3 || !nsec3); + INSIST(node->nspace == DNS_DBNAMESPACE_NSEC3 || !nsec3); qpznode_acquire(qpdb, node DNS__DB_FLARG_PASS); @@ -3026,7 +3029,7 @@ previous_closest_nsec(dns_rdatatype_t type, qpz_search_t *search, * It is the first node sought in the NSEC tree. */ *firstp = false; - result = dns_qp_lookup(&qpr, name, DNS_DB_NSEC_NSEC, + result = dns_qp_lookup(&qpr, name, DNS_DBNAMESPACE_NSEC, NULL, nit, NULL, NULL, NULL); INSIST(result != ISC_R_NOTFOUND); if (result == ISC_R_SUCCESS) { @@ -3060,9 +3063,9 @@ previous_closest_nsec(dns_rdatatype_t type, qpz_search_t *search, } *nodep = NULL; - result = dns_qp_lookup(&search->qpr, name, DNS_DB_NSEC_NORMAL, - NULL, &search->iter, &search->chain, - (void **)nodep, NULL); + result = dns_qp_lookup( + &search->qpr, name, DNS_DBNAMESPACE_NORMAL, NULL, + &search->iter, &search->chain, (void **)nodep, NULL); if (result == ISC_R_SUCCESS) { break; } @@ -3454,9 +3457,9 @@ qpzone_find(dns_db_t *db, const dns_name_t *name, dns_dbversion_t *version, if ((options & DNS_DBFIND_FORCENSEC3) != 0) { nsec3 = true; - nspace = DNS_DB_NSEC_NSEC3; + nspace = DNS_DBNAMESPACE_NSEC3; } else { - nspace = DNS_DB_NSEC_NORMAL; + nspace = DNS_DBNAMESPACE_NORMAL; } dns_qpmulti_query(qpdb->tree, &search.qpr); @@ -4310,7 +4313,7 @@ dbiterator_first(dns_dbiterator_t *iterator DNS__DB_FLARG) { * If we immediately hit an NSEC/NSEC3 node, * we don't have any non-nsec nodes. */ - if (qpdbiter->node->nspace != DNS_DB_NSEC_NORMAL) { + if (qpdbiter->node->nspace != DNS_DBNAMESPACE_NORMAL) { qpdbiter->node = NULL; result = ISC_R_NOMORE; } @@ -4334,10 +4337,10 @@ dbiterator_first(dns_dbiterator_t *iterator DNS__DB_FLARG) { * If we hit an NSEC node, we need to start at the NSEC3 part of * the tree. */ - if (qpdbiter->node->nspace != DNS_DB_NSEC_NSEC) { + if (qpdbiter->node->nspace != DNS_DBNAMESPACE_NSEC) { break; } - INSIST(qpdbiter->node->nspace == DNS_DB_NSEC_NSEC); + INSIST(qpdbiter->node->nspace == DNS_DBNAMESPACE_NSEC); /* FALLTHROUGH */ case nsec3only: @@ -4346,8 +4349,9 @@ dbiterator_first(dns_dbiterator_t *iterator DNS__DB_FLARG) { * origin node. */ result = dns_qp_lookup(qpdbiter->snap, &qpdb->common.origin, - DNS_DB_NSEC_NSEC3, NULL, &qpdbiter->iter, - NULL, (void **)&qpdbiter->node, NULL); + DNS_DBNAMESPACE_NSEC3, NULL, + &qpdbiter->iter, NULL, + (void **)&qpdbiter->node, NULL); if (result != ISC_R_SUCCESS || QPDBITER_NSEC3_ORIGIN_NODE(qpdb, qpdbiter)) { @@ -4397,7 +4401,8 @@ dbiterator_last(dns_dbiterator_t *iterator DNS__DB_FLARG) { /* tree only has NSEC3 origin node. */ qpdbiter->node = NULL; result = ISC_R_NOMORE; - } else if (qpdbiter->node->nspace != DNS_DB_NSEC_NSEC3) + } else if (qpdbiter->node->nspace != + DNS_DBNAMESPACE_NSEC3) { /* tree has no NSEC3 nodes at all. */ qpdbiter->node = NULL; @@ -4423,10 +4428,10 @@ dbiterator_last(dns_dbiterator_t *iterator DNS__DB_FLARG) { * If we hit an NSEC node, we need to seek the final normal node * of the tree. */ - if (qpdbiter->node->nspace != DNS_DB_NSEC_NSEC) { + if (qpdbiter->node->nspace != DNS_DBNAMESPACE_NSEC) { break; } - INSIST(qpdbiter->node->nspace == DNS_DB_NSEC_NSEC); + INSIST(qpdbiter->node->nspace == DNS_DBNAMESPACE_NSEC); /* FALLTHROUGH */ case nonsec3: @@ -4434,8 +4439,9 @@ dbiterator_last(dns_dbiterator_t *iterator DNS__DB_FLARG) { * The final non-nsec node is before the the NSEC origin node. */ result = dns_qp_lookup(qpdbiter->snap, &qpdb->common.origin, - DNS_DB_NSEC_NSEC, NULL, &qpdbiter->iter, - NULL, (void **)&qpdbiter->node, NULL); + DNS_DBNAMESPACE_NSEC, NULL, + &qpdbiter->iter, NULL, + (void **)&qpdbiter->node, NULL); if (result == ISC_R_SUCCESS) { INSIST(QPDBITER_NSEC_ORIGIN_NODE(qpdb, qpdbiter)); /* skip the NSEC origin node */ @@ -4452,7 +4458,8 @@ dbiterator_last(dns_dbiterator_t *iterator DNS__DB_FLARG) { (void **)&qpdbiter->node, NULL); INSIST(result == ISC_R_SUCCESS); - INSIST(qpdbiter->node->nspace == DNS_DB_NSEC_NORMAL); + INSIST(qpdbiter->node->nspace == + DNS_DBNAMESPACE_NORMAL); } break; default: @@ -4486,22 +4493,22 @@ dbiterator_seek(dns_dbiterator_t *iterator, switch (qpdbiter->nsec3mode) { case nsec3only: - result = dns_qp_lookup(qpdbiter->snap, name, DNS_DB_NSEC_NSEC3, - NULL, &qpdbiter->iter, NULL, - (void **)&qpdbiter->node, NULL); + result = dns_qp_lookup( + qpdbiter->snap, name, DNS_DBNAMESPACE_NSEC3, NULL, + &qpdbiter->iter, NULL, (void **)&qpdbiter->node, NULL); break; case nonsec3: - result = dns_qp_lookup(qpdbiter->snap, name, DNS_DB_NSEC_NORMAL, - NULL, &qpdbiter->iter, NULL, - (void **)&qpdbiter->node, NULL); + result = dns_qp_lookup( + qpdbiter->snap, name, DNS_DBNAMESPACE_NORMAL, NULL, + &qpdbiter->iter, NULL, (void **)&qpdbiter->node, NULL); break; case full: - result = dns_qp_lookup(qpdbiter->snap, name, DNS_DB_NSEC_NORMAL, - NULL, &qpdbiter->iter, NULL, - (void **)&qpdbiter->node, NULL); + result = dns_qp_lookup( + qpdbiter->snap, name, DNS_DBNAMESPACE_NORMAL, NULL, + &qpdbiter->iter, NULL, (void **)&qpdbiter->node, NULL); if (result != ISC_R_SUCCESS) { tresult = dns_qp_lookup(qpdbiter->snap, name, - DNS_DB_NSEC_NSEC3, NULL, + DNS_DBNAMESPACE_NSEC3, NULL, &qpdbiter->iter, NULL, (void **)&qpdbiter->node, NULL); if (tresult == ISC_R_SUCCESS) { @@ -4548,7 +4555,8 @@ dbiterator_prev(dns_dbiterator_t *iterator DNS__DB_FLARG) { /* we hit the NSEC3 origin node. */ qpdbiter->node = NULL; result = ISC_R_NOMORE; - } else if (qpdbiter->node->nspace != DNS_DB_NSEC_NSEC3) + } else if (qpdbiter->node->nspace != + DNS_DBNAMESPACE_NSEC3) { /* we hit a non-NSEC3 node. */ qpdbiter->node = NULL; @@ -4574,14 +4582,15 @@ dbiterator_prev(dns_dbiterator_t *iterator DNS__DB_FLARG) { * If we hit an NSEC node, we need to seek the final normal node * of the tree. */ - if (qpdbiter->node->nspace != DNS_DB_NSEC_NSEC) { + if (qpdbiter->node->nspace != DNS_DBNAMESPACE_NSEC) { break; } - INSIST(qpdbiter->node->nspace == DNS_DB_NSEC_NSEC); + INSIST(qpdbiter->node->nspace == DNS_DBNAMESPACE_NSEC); result = dns_qp_lookup(qpdbiter->snap, &qpdb->common.origin, - DNS_DB_NSEC_NSEC, NULL, &qpdbiter->iter, - NULL, (void **)&qpdbiter->node, NULL); + DNS_DBNAMESPACE_NSEC, NULL, + &qpdbiter->iter, NULL, + (void **)&qpdbiter->node, NULL); if (result == ISC_R_SUCCESS) { INSIST(QPDBITER_NSEC_ORIGIN_NODE(qpdb, qpdbiter)); @@ -4599,7 +4608,8 @@ dbiterator_prev(dns_dbiterator_t *iterator DNS__DB_FLARG) { (void **)&qpdbiter->node, NULL); INSIST(result == ISC_R_SUCCESS); - INSIST(qpdbiter->node->nspace == DNS_DB_NSEC_NORMAL); + INSIST(qpdbiter->node->nspace == + DNS_DBNAMESPACE_NORMAL); } break; case nonsec3: @@ -4639,7 +4649,7 @@ dbiterator_next(dns_dbiterator_t *iterator DNS__DB_FLARG) { case nonsec3: if (result == ISC_R_SUCCESS) { /* we hit an NSEC or NSEC3 node. */ - if (qpdbiter->node->nspace != DNS_DB_NSEC_NORMAL) { + if (qpdbiter->node->nspace != DNS_DBNAMESPACE_NORMAL) { qpdbiter->node = NULL; result = ISC_R_NOMORE; } @@ -4663,14 +4673,15 @@ dbiterator_next(dns_dbiterator_t *iterator DNS__DB_FLARG) { * If we hit an NSEC node, we need to start at the NSEC3 part of * the tree. */ - if (qpdbiter->node->nspace != DNS_DB_NSEC_NSEC) { + if (qpdbiter->node->nspace != DNS_DBNAMESPACE_NSEC) { break; } - INSIST(qpdbiter->node->nspace == DNS_DB_NSEC_NSEC); + INSIST(qpdbiter->node->nspace == DNS_DBNAMESPACE_NSEC); result = dns_qp_lookup(qpdbiter->snap, &qpdb->common.origin, - DNS_DB_NSEC_NSEC3, NULL, &qpdbiter->iter, - NULL, (void **)&qpdbiter->node, NULL); + DNS_DBNAMESPACE_NSEC3, NULL, + &qpdbiter->iter, NULL, + (void **)&qpdbiter->node, NULL); if (result != ISC_R_SUCCESS || QPDBITER_NSEC3_ORIGIN_NODE(qpdb, qpdbiter)) { @@ -4774,7 +4785,7 @@ qpzone_createiterator(dns_db_t *db, unsigned int options, * seek the NSEC3 origin node. */ result = dns_qp_lookup(iter->snap, &qpdb->common.origin, - DNS_DB_NSEC_NSEC3, NULL, &iter->iter, + DNS_DBNAMESPACE_NSEC3, NULL, &iter->iter, NULL, NULL, NULL); INSIST(result == ISC_R_SUCCESS); break; @@ -4814,10 +4825,10 @@ qpzone_addrdataset(dns_db_t *db, dns_dbnode_t *dbnode, return DNS_R_NOTZONETOP; } - REQUIRE((node->nspace == DNS_DB_NSEC_NSEC3 && + REQUIRE((node->nspace == DNS_DBNAMESPACE_NSEC3 && (rdataset->type == dns_rdatatype_nsec3 || rdataset->covers == dns_rdatatype_nsec3)) || - (node->nspace != DNS_DB_NSEC_NSEC3 && + (node->nspace != DNS_DBNAMESPACE_NSEC3 && rdataset->type != dns_rdatatype_nsec3 && rdataset->covers != dns_rdatatype_nsec3)); @@ -4884,7 +4895,7 @@ qpzone_addrdataset(dns_db_t *db, dns_dbnode_t *dbnode, * move on. */ qpznode_t *nsecnode = new_qpznode(qpdb, name); - nsecnode->nspace = DNS_DB_NSEC_NSEC; + nsecnode->nspace = DNS_DBNAMESPACE_NSEC; (void)dns_qp_insert(nsec, nsecnode, 0); qpznode_detach(&nsecnode); } @@ -4935,10 +4946,10 @@ qpzone_subtractrdataset(dns_db_t *db, dns_dbnode_t *dbnode, REQUIRE(VALID_QPZONE(qpdb)); REQUIRE(version != NULL && version->qpdb == qpdb); - REQUIRE((node->nspace == DNS_DB_NSEC_NSEC3 && + REQUIRE((node->nspace == DNS_DBNAMESPACE_NSEC3 && (rdataset->type == dns_rdatatype_nsec3 || rdataset->covers == dns_rdatatype_nsec3)) || - (node->nspace != DNS_DB_NSEC_NSEC3 && + (node->nspace != DNS_DBNAMESPACE_NSEC3 && rdataset->type != dns_rdatatype_nsec3 && rdataset->covers != dns_rdatatype_nsec3)); diff --git a/lib/dns/rpz.c b/lib/dns/rpz.c index c72564b317..ab310ff8ef 100644 --- a/lib/dns/rpz.c +++ b/lib/dns/rpz.c @@ -1422,7 +1422,8 @@ add_nm(dns_rpz_zones_t *rpzs, dns_name_t *trig_name, const nmdata_t *new_data) { dns_qp_t *qp = NULL; dns_qpmulti_write(rpzs->table, &qp); - result = dns_qp_getname(qp, trig_name, 0, (void **)&data, NULL); + result = dns_qp_getname(qp, trig_name, DNS_DBNAMESPACE_NORMAL, + (void **)&data, NULL); if (result != ISC_R_SUCCESS) { INSIST(data == NULL); data = new_nmdata(rpzs->mctx, trig_name, new_data); @@ -2291,7 +2292,8 @@ del_name(dns_rpz_zone_t *rpz, dns_rpz_type_t rpz_type, trig_name = dns_fixedname_initname(&trig_namef); name2data(rpz, rpz_type, src_name, trig_name, &del_data); - result = dns_qp_getname(qp, trig_name, 0, (void **)&data, NULL); + result = dns_qp_getname(qp, trig_name, DNS_DBNAMESPACE_NORMAL, + (void **)&data, NULL); if (result != ISC_R_SUCCESS) { return; } @@ -2314,7 +2316,8 @@ del_name(dns_rpz_zone_t *rpz, dns_rpz_type_t rpz_type, if (data->set.qname == 0 && data->set.ns == 0 && data->wild.qname == 0 && data->wild.ns == 0) { - result = dns_qp_deletename(qp, trig_name, 0, NULL, NULL); + result = dns_qp_deletename(qp, trig_name, + DNS_DBNAMESPACE_NORMAL, NULL, NULL); if (result != ISC_R_SUCCESS) { /* * bin/tests/system/rpz/tests.sh looks for @@ -2516,8 +2519,8 @@ dns_rpz_find_name(dns_rpz_zones_t *rpzs, dns_rpz_type_t rpz_type, dns_qpmulti_query(rpzs->table, &qpr); dns_qpchain_init(&qpr, &chain); - result = dns_qp_lookup(&qpr, trig_name, 0, NULL, NULL, &chain, - (void **)&data, NULL); + result = dns_qp_lookup(&qpr, trig_name, DNS_DBNAMESPACE_NORMAL, NULL, + NULL, &chain, (void **)&data, NULL); switch (result) { case ISC_R_SUCCESS: INSIST(data != NULL); @@ -2667,7 +2670,7 @@ static size_t qp_makekey(dns_qpkey_t key, void *uctx ISC_ATTR_UNUSED, void *pval, uint32_t ival ISC_ATTR_UNUSED) { nmdata_t *data = pval; - return dns_qpkey_fromname(key, &data->name, 0); + return dns_qpkey_fromname(key, &data->name, DNS_DBNAMESPACE_NORMAL); } static void diff --git a/lib/dns/zt.c b/lib/dns/zt.c index 113e5d0139..fae234ba67 100644 --- a/lib/dns/zt.c +++ b/lib/dns/zt.c @@ -77,7 +77,7 @@ ztqpmakekey(dns_qpkey_t key, void *uctx ISC_ATTR_UNUSED, void *pval, uint32_t ival ISC_ATTR_UNUSED) { dns_zone_t *zone = pval; dns_name_t *name = dns_zone_getorigin(zone); - return dns_qpkey_fromname(key, name, 0); + return dns_qpkey_fromname(key, name, DNS_DBNAMESPACE_NORMAL); } static void @@ -156,7 +156,8 @@ dns_zt_unmount(dns_zt_t *zt, dns_zone_t *zone) { REQUIRE(VALID_ZT(zt)); dns_qpmulti_write(zt->multi, &qp); - result = dns_qp_deletename(qp, dns_zone_getorigin(zone), 0, NULL, NULL); + result = dns_qp_deletename(qp, dns_zone_getorigin(zone), + DNS_DBNAMESPACE_NORMAL, NULL, NULL); dns_qp_compact(qp, DNS_QPGC_MAYBE); dns_qpmulti_commit(zt->multi, &qp); @@ -179,10 +180,11 @@ dns_zt_find(dns_zt_t *zt, const dns_name_t *name, dns_ztfind_t options, dns_qpmulti_query(zt->multi, &qpr); if (exactopts == DNS_ZTFIND_EXACT) { - result = dns_qp_getname(&qpr, name, 0, &pval, NULL); + result = dns_qp_getname(&qpr, name, DNS_DBNAMESPACE_NORMAL, + &pval, NULL); } else { - result = dns_qp_lookup(&qpr, name, 0, NULL, NULL, &chain, &pval, - NULL); + result = dns_qp_lookup(&qpr, name, DNS_DBNAMESPACE_NORMAL, NULL, + NULL, &chain, &pval, NULL); if (exactopts == DNS_ZTFIND_NOEXACT && result == ISC_R_SUCCESS) { /* get pval from the previous chain link */ diff --git a/tests/bench/load-names.c b/tests/bench/load-names.c index ca9578fb27..4ef00cbb03 100644 --- a/tests/bench/load-names.c +++ b/tests/bench/load-names.c @@ -66,7 +66,8 @@ static size_t item_makekey(dns_qpkey_t key, void *ctx, void *pval, uint32_t ival) { UNUSED(ctx); assert(pval == &item[ival]); - return dns_qpkey_fromname(key, &item[ival].fixed.name, 0); + return dns_qpkey_fromname(key, &item[ival].fixed.name, + DNS_DBNAMESPACE_NORMAL); } static void @@ -325,7 +326,8 @@ sqz_qp(void *qp) { static isc_result_t get_qp(void *qp, size_t count, void **pval) { - return dns_qp_getname(qp, &item[count].fixed.name, 0, pval, NULL); + return dns_qp_getname(qp, &item[count].fixed.name, + DNS_DBNAMESPACE_NORMAL, pval, NULL); } static void * diff --git a/tests/bench/qp-dump.c b/tests/bench/qp-dump.c index 92446dfae7..8300c5cd60 100644 --- a/tests/bench/qp-dump.c +++ b/tests/bench/qp-dump.c @@ -87,7 +87,7 @@ qpkey_from_smallname(dns_qpkey_t key, void *ctx, void *pval, uint32_t ival) { UNUSED(ctx); dns_name_t name = DNS_NAME_INITEMPTY; name_from_smallname(&name, pval, ival); - return dns_qpkey_fromname(key, &name, 0); + return dns_qpkey_fromname(key, &name, DNS_DBNAMESPACE_NORMAL); } static void diff --git a/tests/bench/qplookups.c b/tests/bench/qplookups.c index 50921dada4..172019b867 100644 --- a/tests/bench/qplookups.c +++ b/tests/bench/qplookups.c @@ -81,7 +81,7 @@ qpkey_from_smallname(dns_qpkey_t key, void *ctx, void *pval, uint32_t ival) { UNUSED(ctx); dns_name_t name = DNS_NAME_INITEMPTY; name_from_smallname(&name, pval, ival); - return dns_qpkey_fromname(key, &name, 0); + return dns_qpkey_fromname(key, &name, DNS_DBNAMESPACE_NORMAL); } static void @@ -228,7 +228,7 @@ main(int argc, char **argv) { start = isc_time_monotonic(); for (i = 0; i < n; i++) { name = dns_fixedname_name(&items[i]); - dns_qp_getname(qp, name, 0, NULL, NULL); + dns_qp_getname(qp, name, DNS_DBNAMESPACE_NORMAL, NULL, NULL); } stop = isc_time_monotonic(); @@ -238,7 +238,8 @@ main(int argc, char **argv) { start = isc_time_monotonic(); for (i = 0; i < n; i++) { name = dns_fixedname_name(&items[i]); - dns_qp_lookup(qp, name, 0, NULL, NULL, NULL, NULL, NULL); + dns_qp_lookup(qp, name, DNS_DBNAMESPACE_NORMAL, NULL, NULL, + NULL, NULL, NULL); } stop = isc_time_monotonic(); @@ -263,7 +264,8 @@ main(int argc, char **argv) { ++search->ndata[1]; } - dns_qp_lookup(qp, search, 0, NULL, NULL, NULL, NULL, NULL); + dns_qp_lookup(qp, search, DNS_DBNAMESPACE_NORMAL, NULL, NULL, + NULL, NULL, NULL); } stop = isc_time_monotonic(); diff --git a/tests/dns/qp_test.c b/tests/dns/qp_test.c index ef8cd56b26..bf7368629d 100644 --- a/tests/dns/qp_test.c +++ b/tests/dns/qp_test.c @@ -51,69 +51,69 @@ ISC_RUN_TEST_IMPL(qpkey_name) { } testcases[] = { { .namestr = "", - .space = DNS_DB_NSEC_NORMAL, + .space = DNS_DBNAMESPACE_NORMAL, .key = { 0x07, 0x02 }, .len = 1, }, { .namestr = ".", - .space = DNS_DB_NSEC_NORMAL, + .space = DNS_DBNAMESPACE_NORMAL, .key = { 0x07, 0x02, 0x02 }, .len = 2, }, { .namestr = "\\000", - .space = DNS_DB_NSEC_NORMAL, + .space = DNS_DBNAMESPACE_NORMAL, .key = { 0x07, 0x03, 0x03, 0x02 }, .len = 4, }, { .namestr = "\\000\\009", - .space = DNS_DB_NSEC_NORMAL, + .space = DNS_DBNAMESPACE_NORMAL, .key = { 0x07, 0x03, 0x03, 0x03, 0x0c, 0x02 }, .len = 6, }, { .namestr = "com", - .space = DNS_DB_NSEC_NORMAL, + .space = DNS_DBNAMESPACE_NORMAL, .key = { 0x07, 0x16, 0x22, 0x20, 0x02 }, .len = 5, }, { .namestr = "com.", - .space = DNS_DB_NSEC_NSEC, + .space = DNS_DBNAMESPACE_NSEC, .key = { 0x08, 0x02, 0x16, 0x22, 0x20, 0x02 }, .len = 6, }, { .namestr = "com.", - .space = DNS_DB_NSEC_NSEC3, + .space = DNS_DBNAMESPACE_NSEC3, .key = { 0x09, 0x02, 0x16, 0x22, 0x20, 0x02 }, .len = 6, }, { .namestr = "com.", - .space = DNS_DB_NSEC_NORMAL, + .space = DNS_DBNAMESPACE_NORMAL, .key = { 0x07, 0x02, 0x16, 0x22, 0x20, 0x02 }, .len = 6, }, { .namestr = "example.com.", - .space = DNS_DB_NSEC_NORMAL, + .space = DNS_DBNAMESPACE_NORMAL, .key = { 0x07, 0x02, 0x16, 0x22, 0x20, 0x02, 0x18, 0x2b, 0x14, 0x20, 0x23, 0x1f, 0x18, 0x02 }, .len = 14, }, { .namestr = "example.com", - .space = DNS_DB_NSEC_NORMAL, + .space = DNS_DBNAMESPACE_NORMAL, .key = { 0x07, 0x16, 0x22, 0x20, 0x02, 0x18, 0x2b, 0x14, 0x20, 0x23, 0x1f, 0x18, 0x02 }, .len = 13, }, { .namestr = "EXAMPLE.COM", - .space = DNS_DB_NSEC_NORMAL, + .space = DNS_DBNAMESPACE_NORMAL, .key = { 0x07, 0x16, 0x22, 0x20, 0x02, 0x18, 0x2b, 0x14, 0x20, 0x23, 0x1f, 0x18, 0x02 }, .len = 13, @@ -159,21 +159,23 @@ ISC_RUN_TEST_IMPL(qpkey_sort) { size_t len; dns_qpkey_t key; } testcases[] = { - { .namestr = ".", .space = DNS_DB_NSEC_NORMAL }, - { .namestr = "\\000.", .space = DNS_DB_NSEC_NORMAL }, - { .namestr = "\\000.\\000.", .space = DNS_DB_NSEC_NORMAL }, - { .namestr = "\\000\\009.", .space = DNS_DB_NSEC_NORMAL }, - { .namestr = "\\007.", .space = DNS_DB_NSEC_NORMAL }, - { .namestr = "example.com.", .space = DNS_DB_NSEC_NORMAL }, - { .namestr = "EXAMPLE.COM.", .space = DNS_DB_NSEC_NORMAL }, - { .namestr = "www.example.com.", .space = DNS_DB_NSEC_NORMAL }, - { .namestr = "exam.com.", .space = DNS_DB_NSEC_NORMAL }, - { .namestr = "exams.com.", .space = DNS_DB_NSEC_NORMAL }, - { .namestr = "exam\\000.com.", .space = DNS_DB_NSEC_NORMAL }, - { .namestr = "exam.com.", .space = DNS_DB_NSEC_NSEC }, - { .namestr = "exams.com.", .space = DNS_DB_NSEC_NSEC }, - { .namestr = "exam.com.", .space = DNS_DB_NSEC_NSEC3 }, - { .namestr = "exams.com.", .space = DNS_DB_NSEC_NSEC3 }, + { .namestr = ".", .space = DNS_DBNAMESPACE_NORMAL }, + { .namestr = "\\000.", .space = DNS_DBNAMESPACE_NORMAL }, + { .namestr = "\\000.\\000.", .space = DNS_DBNAMESPACE_NORMAL }, + { .namestr = "\\000\\009.", .space = DNS_DBNAMESPACE_NORMAL }, + { .namestr = "\\007.", .space = DNS_DBNAMESPACE_NORMAL }, + { .namestr = "example.com.", .space = DNS_DBNAMESPACE_NORMAL }, + { .namestr = "EXAMPLE.COM.", .space = DNS_DBNAMESPACE_NORMAL }, + { .namestr = "www.example.com.", + .space = DNS_DBNAMESPACE_NORMAL }, + { .namestr = "exam.com.", .space = DNS_DBNAMESPACE_NORMAL }, + { .namestr = "exams.com.", .space = DNS_DBNAMESPACE_NORMAL }, + { .namestr = "exam\\000.com.", + .space = DNS_DBNAMESPACE_NORMAL }, + { .namestr = "exam.com.", .space = DNS_DBNAMESPACE_NSEC }, + { .namestr = "exams.com.", .space = DNS_DBNAMESPACE_NSEC }, + { .namestr = "exam.com.", .space = DNS_DBNAMESPACE_NSEC3 }, + { .namestr = "exams.com.", .space = DNS_DBNAMESPACE_NSEC3 }, }; for (size_t i = 0; i < ARRAY_SIZE(testcases); i++) { @@ -421,7 +423,7 @@ check_partialmatch(dns_qp_t *qp, struct check_partialmatch check[], #if 0 fprintf(stderr, "%s%s %s (expected %s) " "value \"%s\" (expected \"%s\")\n", - space == DNS_DB_NSEC_NSEC3 ? "NSEC3:" : (space == DNS_DB_NSEC_NSEC ? "NSEC:" : ""), + space == DNS_DBNAMESPACE_NSEC3 ? "NSEC3:" : (space == DNS_DBNAMESPACE_NSEC ? "NSEC:" : ""), check[i].query, isc_result_totext(result), isc_result_totext(check[i].result), (char *)pval, @@ -496,9 +498,9 @@ ISC_RUN_TEST_IMPL(partialmatch) { * results when we want "not found". */ while (insert[i][0] != '.') { - insert_name(qp, insert[i], DNS_DB_NSEC_NORMAL); - insert_name(qp, insert[i], DNS_DB_NSEC_NSEC); - insert_name(qp, insert[i], DNS_DB_NSEC_NSEC3); + insert_name(qp, insert[i], DNS_DBNAMESPACE_NORMAL); + insert_name(qp, insert[i], DNS_DBNAMESPACE_NSEC); + insert_name(qp, insert[i], DNS_DBNAMESPACE_NSEC3); i++; } @@ -517,15 +519,15 @@ ISC_RUN_TEST_IMPL(partialmatch) { { "my.other.foo.bar.", DNS_R_PARTIALMATCH, "foo.bar." }, { NULL, 0, NULL }, }; - check_partialmatch(qp, check1, DNS_DB_NSEC_NORMAL); - check_partialmatch(qp, check1, DNS_DB_NSEC_NSEC); - check_partialmatch(qp, check1, DNS_DB_NSEC_NSEC3); + check_partialmatch(qp, check1, DNS_DBNAMESPACE_NORMAL); + check_partialmatch(qp, check1, DNS_DBNAMESPACE_NSEC); + check_partialmatch(qp, check1, DNS_DBNAMESPACE_NSEC3); /* what if the trie contains the root? */ INSIST(insert[i][0] == '.'); - insert_name(qp, insert[i], DNS_DB_NSEC_NORMAL); - insert_name(qp, insert[i], DNS_DB_NSEC_NSEC); - insert_name(qp, insert[i], DNS_DB_NSEC_NSEC3); + insert_name(qp, insert[i], DNS_DBNAMESPACE_NORMAL); + insert_name(qp, insert[i], DNS_DBNAMESPACE_NSEC); + insert_name(qp, insert[i], DNS_DBNAMESPACE_NSEC3); i++; static struct check_partialmatch check2[] = { @@ -535,26 +537,26 @@ ISC_RUN_TEST_IMPL(partialmatch) { { "bar", ISC_R_NOTFOUND, NULL }, { NULL, 0, NULL }, }; - check_partialmatch(qp, check2, DNS_DB_NSEC_NORMAL); - check_partialmatch(qp, check2, DNS_DB_NSEC_NSEC); - check_partialmatch(qp, check2, DNS_DB_NSEC_NSEC3); + check_partialmatch(qp, check2, DNS_DBNAMESPACE_NORMAL); + check_partialmatch(qp, check2, DNS_DBNAMESPACE_NSEC); + check_partialmatch(qp, check2, DNS_DBNAMESPACE_NSEC3); /* * what if entries in the trie are relative to the zone apex * and there's no root node? */ - delete_rootkey(qp, DNS_DB_NSEC_NORMAL); - delete_rootkey(qp, DNS_DB_NSEC_NSEC); - delete_rootkey(qp, DNS_DB_NSEC_NSEC3); + delete_rootkey(qp, DNS_DBNAMESPACE_NORMAL); + delete_rootkey(qp, DNS_DBNAMESPACE_NSEC); + delete_rootkey(qp, DNS_DBNAMESPACE_NSEC3); static struct check_partialmatch check3[] = { { "bar", ISC_R_NOTFOUND, NULL }, { "bar.", ISC_R_NOTFOUND, NULL }, { NULL, 0, NULL }, }; - check_partialmatch(qp, check3, DNS_DB_NSEC_NORMAL); - check_partialmatch(qp, check3, DNS_DB_NSEC_NSEC); - check_partialmatch(qp, check3, DNS_DB_NSEC_NSEC3); + check_partialmatch(qp, check3, DNS_DBNAMESPACE_NORMAL); + check_partialmatch(qp, check3, DNS_DBNAMESPACE_NSEC); + check_partialmatch(qp, check3, DNS_DBNAMESPACE_NSEC3); dns_qp_destroy(&qp); } @@ -627,97 +629,101 @@ ISC_RUN_TEST_IMPL(qpchain) { dns_qp_create(mctx, &string_methods, NULL, &qp); while (insert[i][0] != '\0') { - insert_name(qp, insert[i], DNS_DB_NSEC_NORMAL); - insert_name(qp, insert[i], DNS_DB_NSEC_NSEC); - insert_name(qp, insert[i], DNS_DB_NSEC_NSEC3); + insert_name(qp, insert[i], DNS_DBNAMESPACE_NORMAL); + insert_name(qp, insert[i], DNS_DBNAMESPACE_NSEC); + insert_name(qp, insert[i], DNS_DBNAMESPACE_NSEC3); i++; } static struct check_qpchain check1[] = { - { "b.", DNS_DB_NSEC_NORMAL, ISC_R_SUCCESS, 2, { ".", "b." } }, - { "b.", DNS_DB_NSEC_NSEC, ISC_R_SUCCESS, 2, { ".", "b." } }, - { "b.", DNS_DB_NSEC_NSEC3, ISC_R_SUCCESS, 2, { ".", "b." } }, + { "b.", + DNS_DBNAMESPACE_NORMAL, + ISC_R_SUCCESS, + 2, + { ".", "b." } }, + { "b.", DNS_DBNAMESPACE_NSEC, ISC_R_SUCCESS, 2, { ".", "b." } }, + { "b.", DNS_DBNAMESPACE_NSEC3, ISC_R_SUCCESS, 2, { ".", "b." } }, { "b.a.", - DNS_DB_NSEC_NORMAL, + DNS_DBNAMESPACE_NORMAL, ISC_R_SUCCESS, 3, { ".", "a.", "b.a." } }, { "b.a.", - DNS_DB_NSEC_NSEC, + DNS_DBNAMESPACE_NSEC, ISC_R_SUCCESS, 3, { ".", "a.", "b.a." } }, { "b.a.", - DNS_DB_NSEC_NSEC3, + DNS_DBNAMESPACE_NSEC3, ISC_R_SUCCESS, 3, { ".", "a.", "b.a." } }, - { "c.", DNS_DB_NSEC_NORMAL, DNS_R_PARTIALMATCH, 1, { "." } }, - { "c.", DNS_DB_NSEC_NSEC, DNS_R_PARTIALMATCH, 1, { "." } }, - { "c.", DNS_DB_NSEC_NSEC3, DNS_R_PARTIALMATCH, 1, { "." } }, + { "c.", DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 1, { "." } }, + { "c.", DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 1, { "." } }, + { "c.", DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 1, { "." } }, { "e.d.c.b.a.", - DNS_DB_NSEC_NORMAL, + DNS_DBNAMESPACE_NORMAL, ISC_R_SUCCESS, 5, { ".", "a.", "b.a.", "c.b.a.", "e.d.c.b.a." } }, { "e.d.c.b.a.", - DNS_DB_NSEC_NSEC, + DNS_DBNAMESPACE_NSEC, ISC_R_SUCCESS, 5, { ".", "a.", "b.a.", "c.b.a.", "e.d.c.b.a." } }, { "e.d.c.b.a.", - DNS_DB_NSEC_NSEC3, + DNS_DBNAMESPACE_NSEC3, ISC_R_SUCCESS, 5, { ".", "a.", "b.a.", "c.b.a.", "e.d.c.b.a." } }, { "a.b.c.d.", - DNS_DB_NSEC_NORMAL, + DNS_DBNAMESPACE_NORMAL, ISC_R_SUCCESS, 3, { ".", "c.d.", "a.b.c.d." } }, { "a.b.c.d.", - DNS_DB_NSEC_NSEC, + DNS_DBNAMESPACE_NSEC, ISC_R_SUCCESS, 3, { ".", "c.d.", "a.b.c.d." } }, { "a.b.c.d.", - DNS_DB_NSEC_NSEC3, + DNS_DBNAMESPACE_NSEC3, ISC_R_SUCCESS, 3, { ".", "c.d.", "a.b.c.d." } }, { "b.c.d.", - DNS_DB_NSEC_NORMAL, + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 2, { ".", "c.d." } }, { "b.c.d.", - DNS_DB_NSEC_NSEC, + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 2, { ".", "c.d." } }, { "b.c.d.", - DNS_DB_NSEC_NSEC3, + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 2, { ".", "c.d." } }, { "z.x.k.c.d.", - DNS_DB_NSEC_NORMAL, + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 3, { ".", "c.d.", "x.k.c.d." } }, { "z.x.k.c.d.", - DNS_DB_NSEC_NSEC, + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 3, { ".", "c.d.", "x.k.c.d." } }, { "z.x.k.c.d.", - DNS_DB_NSEC_NSEC3, + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 3, { ".", "c.d.", "x.k.c.d." } }, @@ -735,25 +741,25 @@ ISC_RUN_TEST_IMPL(qpchain) { dns_qp_create(mctx, &string_methods, NULL, &qp); while (insert2[i][0] != '\0') { - insert_name(qp, insert2[i], DNS_DB_NSEC_NORMAL); - insert_name(qp, insert2[i], DNS_DB_NSEC_NSEC); - insert_name(qp, insert2[i], DNS_DB_NSEC_NSEC3); + insert_name(qp, insert2[i], DNS_DBNAMESPACE_NORMAL); + insert_name(qp, insert2[i], DNS_DBNAMESPACE_NSEC); + insert_name(qp, insert2[i], DNS_DBNAMESPACE_NSEC3); i++; } static struct check_qpchain check2[] = { { "f.c.b.a.", - DNS_DB_NSEC_NORMAL, + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 1, { "a." } }, { "f.c.b.a.", - DNS_DB_NSEC_NSEC, + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 1, { "a." } }, { "f.c.b.a.", - DNS_DB_NSEC_NSEC3, + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 1, { "a." } }, @@ -804,9 +810,9 @@ check_predecessors_withchain(dns_qp_t *qp, struct check_predecessors check[], chain, NULL, NULL); #if 0 fprintf(stderr, "%s %s: expected %s got %s\n", check[i].query, - check[i].space == DNS_DB_NSEC_NSEC3 + check[i].space == DNS_DBNAMESPACE_NSEC3 ? "NSEC3" - : (check[i].space == DNS_DB_NSEC_NSEC + : (check[i].space == DNS_DBNAMESPACE_NSEC ? "NSEC" : "NORMAL"), isc_result_totext(check[i].result), @@ -889,244 +895,244 @@ ISC_RUN_TEST_IMPL(predecessors) { dns_qp_create(mctx, &string_methods, NULL, &qp); while (insert[i][0] != '\0') { - insert_name(qp, insert[i], DNS_DB_NSEC_NORMAL); - insert_name(qp, insert[i], DNS_DB_NSEC_NSEC); - insert_name(qp, insert[i], DNS_DB_NSEC_NSEC3); + insert_name(qp, insert[i], DNS_DBNAMESPACE_NORMAL); + insert_name(qp, insert[i], DNS_DBNAMESPACE_NSEC); + insert_name(qp, insert[i], DNS_DBNAMESPACE_NSEC3); i++; } /* first check: no root label in the database */ static struct check_predecessors check1[] = { - { ".", DNS_DB_NSEC_NORMAL, "moops.", DNS_DB_NSEC_NSEC3, + { ".", DNS_DBNAMESPACE_NORMAL, "moops.", DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 0 }, - { ".", DNS_DB_NSEC_NSEC, "moops.", DNS_DB_NSEC_NORMAL, + { ".", DNS_DBNAMESPACE_NSEC, "moops.", DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 30 }, - { ".", DNS_DB_NSEC_NSEC3, "moops.", DNS_DB_NSEC_NSEC, + { ".", DNS_DBNAMESPACE_NSEC3, "moops.", DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 15 }, - { "a.", DNS_DB_NSEC_NORMAL, "moops.", DNS_DB_NSEC_NSEC3, + { "a.", DNS_DBNAMESPACE_NORMAL, "moops.", DNS_DBNAMESPACE_NSEC3, ISC_R_SUCCESS, 0 }, - { "a.", DNS_DB_NSEC_NSEC, "moops.", DNS_DB_NSEC_NORMAL, + { "a.", DNS_DBNAMESPACE_NSEC, "moops.", DNS_DBNAMESPACE_NORMAL, ISC_R_SUCCESS, 30 }, - { "a.", DNS_DB_NSEC_NSEC3, "moops.", DNS_DB_NSEC_NSEC, + { "a.", DNS_DBNAMESPACE_NSEC3, "moops.", DNS_DBNAMESPACE_NSEC, ISC_R_SUCCESS, 15 }, - { "b.a.", DNS_DB_NSEC_NORMAL, "a.", DNS_DB_NSEC_NORMAL, + { "b.a.", DNS_DBNAMESPACE_NORMAL, "a.", DNS_DBNAMESPACE_NORMAL, ISC_R_SUCCESS, 44 }, - { "b.a.", DNS_DB_NSEC_NSEC, "a.", DNS_DB_NSEC_NSEC, + { "b.a.", DNS_DBNAMESPACE_NSEC, "a.", DNS_DBNAMESPACE_NSEC, ISC_R_SUCCESS, 29 }, - { "b.a.", DNS_DB_NSEC_NSEC3, "a.", DNS_DB_NSEC_NSEC3, + { "b.a.", DNS_DBNAMESPACE_NSEC3, "a.", DNS_DBNAMESPACE_NSEC3, ISC_R_SUCCESS, 14 }, - { "b.", DNS_DB_NSEC_NORMAL, "e.d.c.b.a.", DNS_DB_NSEC_NORMAL, - ISC_R_SUCCESS, 41 }, - { "b.", DNS_DB_NSEC_NSEC, "e.d.c.b.a.", DNS_DB_NSEC_NSEC, - ISC_R_SUCCESS, 26 }, - { "b.", DNS_DB_NSEC_NSEC3, "e.d.c.b.a.", DNS_DB_NSEC_NSEC3, - ISC_R_SUCCESS, 11 }, + { "b.", DNS_DBNAMESPACE_NORMAL, "e.d.c.b.a.", + DNS_DBNAMESPACE_NORMAL, ISC_R_SUCCESS, 41 }, + { "b.", DNS_DBNAMESPACE_NSEC, "e.d.c.b.a.", + DNS_DBNAMESPACE_NSEC, ISC_R_SUCCESS, 26 }, + { "b.", DNS_DBNAMESPACE_NSEC3, "e.d.c.b.a.", + DNS_DBNAMESPACE_NSEC3, ISC_R_SUCCESS, 11 }, - { "aaa.a.", DNS_DB_NSEC_NORMAL, "a.", DNS_DB_NSEC_NORMAL, - DNS_R_PARTIALMATCH, 44 }, - { "aaa.a.", DNS_DB_NSEC_NSEC, "a.", DNS_DB_NSEC_NSEC, + { "aaa.a.", DNS_DBNAMESPACE_NORMAL, "a.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 44 }, + { "aaa.a.", DNS_DBNAMESPACE_NSEC, "a.", DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 29 }, - { "aaa.a.", DNS_DB_NSEC_NSEC3, "a.", DNS_DB_NSEC_NSEC3, + { "aaa.a.", DNS_DBNAMESPACE_NSEC3, "a.", DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 14 }, - { "ddd.a.", DNS_DB_NSEC_NORMAL, "e.d.c.b.a.", - DNS_DB_NSEC_NORMAL, DNS_R_PARTIALMATCH, 41 }, - { "ddd.a.", DNS_DB_NSEC_NSEC, "e.d.c.b.a.", DNS_DB_NSEC_NSEC, - DNS_R_PARTIALMATCH, 26 }, - { "ddd.a.", DNS_DB_NSEC_NSEC3, "e.d.c.b.a.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 11 }, + { "ddd.a.", DNS_DBNAMESPACE_NORMAL, "e.d.c.b.a.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 41 }, + { "ddd.a.", DNS_DBNAMESPACE_NSEC, "e.d.c.b.a.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 26 }, + { "ddd.a.", DNS_DBNAMESPACE_NSEC3, "e.d.c.b.a.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 11 }, - { "d.c.", DNS_DB_NSEC_NORMAL, "c.b.b.", DNS_DB_NSEC_NORMAL, - ISC_R_NOTFOUND, 39 }, - { "d.c.", DNS_DB_NSEC_NSEC, "c.b.b.", DNS_DB_NSEC_NSEC, + { "d.c.", DNS_DBNAMESPACE_NORMAL, "c.b.b.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 39 }, + { "d.c.", DNS_DBNAMESPACE_NSEC, "c.b.b.", DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 24 }, - { "d.c.", DNS_DB_NSEC_NSEC3, "c.b.b.", DNS_DB_NSEC_NSEC3, - ISC_R_NOTFOUND, 9 }, + { "d.c.", DNS_DBNAMESPACE_NSEC3, "c.b.b.", + DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 9 }, - { "1.2.c.b.a.", DNS_DB_NSEC_NORMAL, "c.b.a.", - DNS_DB_NSEC_NORMAL, DNS_R_PARTIALMATCH, 42 }, - { "1.2.c.b.a.", DNS_DB_NSEC_NSEC, "c.b.a.", DNS_DB_NSEC_NSEC, - DNS_R_PARTIALMATCH, 27 }, - { "1.2.c.b.a.", DNS_DB_NSEC_NSEC3, "c.b.a.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 12 }, + { "1.2.c.b.a.", DNS_DBNAMESPACE_NORMAL, "c.b.a.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 42 }, + { "1.2.c.b.a.", DNS_DBNAMESPACE_NSEC, "c.b.a.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 27 }, + { "1.2.c.b.a.", DNS_DBNAMESPACE_NSEC3, "c.b.a.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 12 }, - { "a.b.c.e.f.", DNS_DB_NSEC_NORMAL, "a.b.c.d.e.", - DNS_DB_NSEC_NORMAL, ISC_R_NOTFOUND, 35 }, - { "a.b.c.e.f.", DNS_DB_NSEC_NSEC, "a.b.c.d.e.", - DNS_DB_NSEC_NSEC, ISC_R_NOTFOUND, 20 }, - { "a.b.c.e.f.", DNS_DB_NSEC_NSEC3, "a.b.c.d.e.", - DNS_DB_NSEC_NSEC3, ISC_R_NOTFOUND, 5 }, + { "a.b.c.e.f.", DNS_DBNAMESPACE_NORMAL, "a.b.c.d.e.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 35 }, + { "a.b.c.e.f.", DNS_DBNAMESPACE_NSEC, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 20 }, + { "a.b.c.e.f.", DNS_DBNAMESPACE_NSEC3, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 5 }, - { "z.y.x.", DNS_DB_NSEC_NORMAL, "moops.", DNS_DB_NSEC_NORMAL, - ISC_R_NOTFOUND, 30 }, - { "z.y.x.", DNS_DB_NSEC_NSEC, "moops.", DNS_DB_NSEC_NSEC, - ISC_R_NOTFOUND, 15 }, - { "z.y.x.", DNS_DB_NSEC_NSEC3, "moops.", DNS_DB_NSEC_NSEC3, - ISC_R_NOTFOUND, 0 }, + { "z.y.x.", DNS_DBNAMESPACE_NORMAL, "moops.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 30 }, + { "z.y.x.", DNS_DBNAMESPACE_NSEC, "moops.", + DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 15 }, + { "z.y.x.", DNS_DBNAMESPACE_NSEC3, "moops.", + DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 0 }, - { "w.c.d.", DNS_DB_NSEC_NORMAL, "x.k.c.d.", DNS_DB_NSEC_NORMAL, - DNS_R_PARTIALMATCH, 36 }, - { "w.c.d.", DNS_DB_NSEC_NSEC, "x.k.c.d.", DNS_DB_NSEC_NSEC, - DNS_R_PARTIALMATCH, 21 }, - { "w.c.d.", DNS_DB_NSEC_NSEC3, "x.k.c.d.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 6 }, + { "w.c.d.", DNS_DBNAMESPACE_NORMAL, "x.k.c.d.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 36 }, + { "w.c.d.", DNS_DBNAMESPACE_NSEC, "x.k.c.d.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 21 }, + { "w.c.d.", DNS_DBNAMESPACE_NSEC3, "x.k.c.d.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 6 }, - { "z.z.z.z.k.c.d.", DNS_DB_NSEC_NORMAL, "x.k.c.d.", - DNS_DB_NSEC_NORMAL, DNS_R_PARTIALMATCH, 36 }, - { "z.z.z.z.k.c.d.", DNS_DB_NSEC_NSEC, "x.k.c.d.", - DNS_DB_NSEC_NSEC, DNS_R_PARTIALMATCH, 21 }, - { "z.z.z.z.k.c.d.", DNS_DB_NSEC_NSEC3, "x.k.c.d.", - DNS_DB_NSEC_NSEC3, DNS_R_PARTIALMATCH, 6 }, + { "z.z.z.z.k.c.d.", DNS_DBNAMESPACE_NORMAL, "x.k.c.d.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 36 }, + { "z.z.z.z.k.c.d.", DNS_DBNAMESPACE_NSEC, "x.k.c.d.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 21 }, + { "z.z.z.z.k.c.d.", DNS_DBNAMESPACE_NSEC3, "x.k.c.d.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 6 }, - { "w.k.c.d.", DNS_DB_NSEC_NORMAL, "a.b.c.d.", - DNS_DB_NSEC_NORMAL, DNS_R_PARTIALMATCH, 37 }, - { "w.k.c.d.", DNS_DB_NSEC_NSEC, "a.b.c.d.", DNS_DB_NSEC_NSEC, - DNS_R_PARTIALMATCH, 22 }, - { "w.k.c.d.", DNS_DB_NSEC_NSEC3, "a.b.c.d.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 7 }, + { "w.k.c.d.", DNS_DBNAMESPACE_NORMAL, "a.b.c.d.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 37 }, + { "w.k.c.d.", DNS_DBNAMESPACE_NSEC, "a.b.c.d.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 22 }, + { "w.k.c.d.", DNS_DBNAMESPACE_NSEC3, "a.b.c.d.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 7 }, - { "d.a.", DNS_DB_NSEC_NORMAL, "e.d.c.b.a.", DNS_DB_NSEC_NORMAL, - DNS_R_PARTIALMATCH, 41 }, - { "d.a.", DNS_DB_NSEC_NSEC, "e.d.c.b.a.", DNS_DB_NSEC_NSEC, - DNS_R_PARTIALMATCH, 26 }, - { "d.a.", DNS_DB_NSEC_NSEC3, "e.d.c.b.a.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 11 }, + { "d.a.", DNS_DBNAMESPACE_NORMAL, "e.d.c.b.a.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 41 }, + { "d.a.", DNS_DBNAMESPACE_NSEC, "e.d.c.b.a.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 26 }, + { "d.a.", DNS_DBNAMESPACE_NSEC3, "e.d.c.b.a.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 11 }, - { "0.b.c.d.e.", DNS_DB_NSEC_NORMAL, "x.k.c.d.", - DNS_DB_NSEC_NORMAL, ISC_R_NOTFOUND, 36 }, - { "0.b.c.d.e.", DNS_DB_NSEC_NSEC, "x.k.c.d.", DNS_DB_NSEC_NSEC, - ISC_R_NOTFOUND, 21 }, - { "0.b.c.d.e.", DNS_DB_NSEC_NSEC3, "x.k.c.d.", - DNS_DB_NSEC_NSEC3, ISC_R_NOTFOUND, 6 }, + { "0.b.c.d.e.", DNS_DBNAMESPACE_NORMAL, "x.k.c.d.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 36 }, + { "0.b.c.d.e.", DNS_DBNAMESPACE_NSEC, "x.k.c.d.", + DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 21 }, + { "0.b.c.d.e.", DNS_DBNAMESPACE_NSEC3, "x.k.c.d.", + DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 6 }, - { "b.d.", DNS_DB_NSEC_NORMAL, "c.b.b.", DNS_DB_NSEC_NORMAL, - ISC_R_NOTFOUND, 39 }, - { "b.d.", DNS_DB_NSEC_NSEC, "c.b.b.", DNS_DB_NSEC_NSEC, + { "b.d.", DNS_DBNAMESPACE_NORMAL, "c.b.b.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 39 }, + { "b.d.", DNS_DBNAMESPACE_NSEC, "c.b.b.", DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 24 }, - { "b.d.", DNS_DB_NSEC_NSEC3, "c.b.b.", DNS_DB_NSEC_NSEC3, - ISC_R_NOTFOUND, 9 }, + { "b.d.", DNS_DBNAMESPACE_NSEC3, "c.b.b.", + DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 9 }, - { "mon.", DNS_DB_NSEC_NORMAL, "a.b.c.d.e.", DNS_DB_NSEC_NORMAL, - ISC_R_NOTFOUND, 35 }, - { "mon.", DNS_DB_NSEC_NSEC, "a.b.c.d.e.", DNS_DB_NSEC_NSEC, - ISC_R_NOTFOUND, 20 }, - { "mon.", DNS_DB_NSEC_NSEC3, "a.b.c.d.e.", DNS_DB_NSEC_NSEC3, - ISC_R_NOTFOUND, 5 }, + { "mon.", DNS_DBNAMESPACE_NORMAL, "a.b.c.d.e.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 35 }, + { "mon.", DNS_DBNAMESPACE_NSEC, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 20 }, + { "mon.", DNS_DBNAMESPACE_NSEC3, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 5 }, - { "moor.", DNS_DB_NSEC_NORMAL, "moops.", DNS_DB_NSEC_NORMAL, - ISC_R_NOTFOUND, 30 }, - { "moor.", DNS_DB_NSEC_NSEC, "moops.", DNS_DB_NSEC_NSEC, + { "moor.", DNS_DBNAMESPACE_NORMAL, "moops.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 30 }, + { "moor.", DNS_DBNAMESPACE_NSEC, "moops.", DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 15 }, - { "moor.", DNS_DB_NSEC_NSEC3, "moops.", DNS_DB_NSEC_NSEC3, - ISC_R_NOTFOUND, 0 }, + { "moor.", DNS_DBNAMESPACE_NSEC3, "moops.", + DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 0 }, - { "mopbop.", DNS_DB_NSEC_NORMAL, "moops.", DNS_DB_NSEC_NORMAL, - ISC_R_NOTFOUND, 30 }, - { "mopbop.", DNS_DB_NSEC_NSEC, "moops.", DNS_DB_NSEC_NSEC, + { "mopbop.", DNS_DBNAMESPACE_NORMAL, "moops.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 30 }, + { "mopbop.", DNS_DBNAMESPACE_NSEC, "moops.", + DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 15 }, + { "mopbop.", DNS_DBNAMESPACE_NSEC3, "moops.", + DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 0 }, + + { "moppop.", DNS_DBNAMESPACE_NORMAL, "moops.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 30 }, + { "moppop.", DNS_DBNAMESPACE_NSEC, "moops.", + DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 15 }, + { "moppop.", DNS_DBNAMESPACE_NSEC3, "moops.", + DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 0 }, + + { "mopps.", DNS_DBNAMESPACE_NORMAL, "moops.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 30 }, + { "mopps.", DNS_DBNAMESPACE_NSEC, "moops.", + DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 15 }, + { "mopps.", DNS_DBNAMESPACE_NSEC3, "moops.", + DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 0 }, + + { "mopzop.", DNS_DBNAMESPACE_NORMAL, "moops.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 30 }, + { "mopzop.", DNS_DBNAMESPACE_NSEC, "moops.", + DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 15 }, + { "mopzop.", DNS_DBNAMESPACE_NSEC3, "moops.", + DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 0 }, + + { "mop.", DNS_DBNAMESPACE_NORMAL, "moops.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 30 }, + { "mop.", DNS_DBNAMESPACE_NSEC, "moops.", DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 15 }, - { "mopbop.", DNS_DB_NSEC_NSEC3, "moops.", DNS_DB_NSEC_NSEC3, - ISC_R_NOTFOUND, 0 }, + { "mop.", DNS_DBNAMESPACE_NSEC3, "moops.", + DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 0 }, - { "moppop.", DNS_DB_NSEC_NORMAL, "moops.", DNS_DB_NSEC_NORMAL, - ISC_R_NOTFOUND, 30 }, - { "moppop.", DNS_DB_NSEC_NSEC, "moops.", DNS_DB_NSEC_NSEC, - ISC_R_NOTFOUND, 15 }, - { "moppop.", DNS_DB_NSEC_NSEC3, "moops.", DNS_DB_NSEC_NSEC3, - ISC_R_NOTFOUND, 0 }, + { "monbop.", DNS_DBNAMESPACE_NORMAL, "a.b.c.d.e.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 35 }, + { "monbop.", DNS_DBNAMESPACE_NSEC, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 20 }, + { "monbop.", DNS_DBNAMESPACE_NSEC3, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 5 }, - { "mopps.", DNS_DB_NSEC_NORMAL, "moops.", DNS_DB_NSEC_NORMAL, - ISC_R_NOTFOUND, 30 }, - { "mopps.", DNS_DB_NSEC_NSEC, "moops.", DNS_DB_NSEC_NSEC, - ISC_R_NOTFOUND, 15 }, - { "mopps.", DNS_DB_NSEC_NSEC3, "moops.", DNS_DB_NSEC_NSEC3, - ISC_R_NOTFOUND, 0 }, + { "monpop.", DNS_DBNAMESPACE_NORMAL, "a.b.c.d.e.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 35 }, + { "monpop.", DNS_DBNAMESPACE_NSEC, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 20 }, + { "monpop.", DNS_DBNAMESPACE_NSEC3, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 5 }, - { "mopzop.", DNS_DB_NSEC_NORMAL, "moops.", DNS_DB_NSEC_NORMAL, - ISC_R_NOTFOUND, 30 }, - { "mopzop.", DNS_DB_NSEC_NSEC, "moops.", DNS_DB_NSEC_NSEC, - ISC_R_NOTFOUND, 15 }, - { "mopzop.", DNS_DB_NSEC_NSEC3, "moops.", DNS_DB_NSEC_NSEC3, - ISC_R_NOTFOUND, 0 }, + { "monps.", DNS_DBNAMESPACE_NORMAL, "a.b.c.d.e.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 35 }, + { "monps.", DNS_DBNAMESPACE_NSEC, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 20 }, + { "monps.", DNS_DBNAMESPACE_NSEC3, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 5 }, - { "mop.", DNS_DB_NSEC_NORMAL, "moops.", DNS_DB_NSEC_NORMAL, - ISC_R_NOTFOUND, 30 }, - { "mop.", DNS_DB_NSEC_NSEC, "moops.", DNS_DB_NSEC_NSEC, - ISC_R_NOTFOUND, 15 }, - { "mop.", DNS_DB_NSEC_NSEC3, "moops.", DNS_DB_NSEC_NSEC3, - ISC_R_NOTFOUND, 0 }, + { "monzop.", DNS_DBNAMESPACE_NORMAL, "a.b.c.d.e.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 35 }, + { "monzop.", DNS_DBNAMESPACE_NSEC, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 20 }, + { "monzop.", DNS_DBNAMESPACE_NSEC3, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 5 }, - { "monbop.", DNS_DB_NSEC_NORMAL, "a.b.c.d.e.", - DNS_DB_NSEC_NORMAL, ISC_R_NOTFOUND, 35 }, - { "monbop.", DNS_DB_NSEC_NSEC, "a.b.c.d.e.", DNS_DB_NSEC_NSEC, - ISC_R_NOTFOUND, 20 }, - { "monbop.", DNS_DB_NSEC_NSEC3, "a.b.c.d.e.", DNS_DB_NSEC_NSEC3, - ISC_R_NOTFOUND, 5 }, + { "mon.", DNS_DBNAMESPACE_NORMAL, "a.b.c.d.e.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 35 }, + { "mon.", DNS_DBNAMESPACE_NSEC, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 20 }, + { "mon.", DNS_DBNAMESPACE_NSEC3, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 5 }, - { "monpop.", DNS_DB_NSEC_NORMAL, "a.b.c.d.e.", - DNS_DB_NSEC_NORMAL, ISC_R_NOTFOUND, 35 }, - { "monpop.", DNS_DB_NSEC_NSEC, "a.b.c.d.e.", DNS_DB_NSEC_NSEC, - ISC_R_NOTFOUND, 20 }, - { "monpop.", DNS_DB_NSEC_NSEC3, "a.b.c.d.e.", DNS_DB_NSEC_NSEC3, - ISC_R_NOTFOUND, 5 }, - - { "monps.", DNS_DB_NSEC_NORMAL, "a.b.c.d.e.", - DNS_DB_NSEC_NORMAL, ISC_R_NOTFOUND, 35 }, - { "monps.", DNS_DB_NSEC_NSEC, "a.b.c.d.e.", DNS_DB_NSEC_NSEC, - ISC_R_NOTFOUND, 20 }, - { "monps.", DNS_DB_NSEC_NSEC3, "a.b.c.d.e.", DNS_DB_NSEC_NSEC3, - ISC_R_NOTFOUND, 5 }, - - { "monzop.", DNS_DB_NSEC_NORMAL, "a.b.c.d.e.", - DNS_DB_NSEC_NORMAL, ISC_R_NOTFOUND, 35 }, - { "monzop.", DNS_DB_NSEC_NSEC, "a.b.c.d.e.", DNS_DB_NSEC_NSEC, - ISC_R_NOTFOUND, 20 }, - { "monzop.", DNS_DB_NSEC_NSEC3, "a.b.c.d.e.", DNS_DB_NSEC_NSEC3, - ISC_R_NOTFOUND, 5 }, - - { "mon.", DNS_DB_NSEC_NORMAL, "a.b.c.d.e.", DNS_DB_NSEC_NORMAL, - ISC_R_NOTFOUND, 35 }, - { "mon.", DNS_DB_NSEC_NSEC, "a.b.c.d.e.", DNS_DB_NSEC_NSEC, - ISC_R_NOTFOUND, 20 }, - { "mon.", DNS_DB_NSEC_NSEC3, "a.b.c.d.e.", DNS_DB_NSEC_NSEC3, - ISC_R_NOTFOUND, 5 }, - - { "moop.", DNS_DB_NSEC_NORMAL, "moon.", DNS_DB_NSEC_NORMAL, - ISC_R_NOTFOUND, 31 }, - { "moop.", DNS_DB_NSEC_NSEC, "moon.", DNS_DB_NSEC_NSEC, + { "moop.", DNS_DBNAMESPACE_NORMAL, "moon.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 31 }, + { "moop.", DNS_DBNAMESPACE_NSEC, "moon.", DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 16 }, - { "moop.", DNS_DB_NSEC_NSEC3, "moon.", DNS_DB_NSEC_NSEC3, - ISC_R_NOTFOUND, 1 }, + { "moop.", DNS_DBNAMESPACE_NSEC3, "moon.", + DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 1 }, - { "moopser.", DNS_DB_NSEC_NORMAL, "moops.", DNS_DB_NSEC_NORMAL, - ISC_R_NOTFOUND, 30 }, - { "moopser.", DNS_DB_NSEC_NSEC, "moops.", DNS_DB_NSEC_NSEC, - ISC_R_NOTFOUND, 15 }, - { "moopser.", DNS_DB_NSEC_NSEC3, "moops.", DNS_DB_NSEC_NSEC3, - ISC_R_NOTFOUND, 0 }, + { "moopser.", DNS_DBNAMESPACE_NORMAL, "moops.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 30 }, + { "moopser.", DNS_DBNAMESPACE_NSEC, "moops.", + DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 15 }, + { "moopser.", DNS_DBNAMESPACE_NSEC3, "moops.", + DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 0 }, - { "monky.", DNS_DB_NSEC_NORMAL, "a.b.c.d.e.", - DNS_DB_NSEC_NORMAL, ISC_R_NOTFOUND, 35 }, - { "monky.", DNS_DB_NSEC_NSEC, "a.b.c.d.e.", DNS_DB_NSEC_NSEC, - ISC_R_NOTFOUND, 20 }, - { "monky.", DNS_DB_NSEC_NSEC3, "a.b.c.d.e.", DNS_DB_NSEC_NSEC3, - ISC_R_NOTFOUND, 5 }, + { "monky.", DNS_DBNAMESPACE_NORMAL, "a.b.c.d.e.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 35 }, + { "monky.", DNS_DBNAMESPACE_NSEC, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 20 }, + { "monky.", DNS_DBNAMESPACE_NSEC3, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 5 }, - { "monkey.", DNS_DB_NSEC_NORMAL, "a.b.c.d.e.", - DNS_DB_NSEC_NORMAL, ISC_R_NOTFOUND, 35 }, - { "monkey.", DNS_DB_NSEC_NSEC, "a.b.c.d.e.", DNS_DB_NSEC_NSEC, - ISC_R_NOTFOUND, 20 }, - { "monkey.", DNS_DB_NSEC_NSEC3, "a.b.c.d.e.", DNS_DB_NSEC_NSEC3, - ISC_R_NOTFOUND, 5 }, + { "monkey.", DNS_DBNAMESPACE_NORMAL, "a.b.c.d.e.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 35 }, + { "monkey.", DNS_DBNAMESPACE_NSEC, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 20 }, + { "monkey.", DNS_DBNAMESPACE_NSEC3, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 5 }, - { "monker.", DNS_DB_NSEC_NORMAL, "a.b.c.d.e.", - DNS_DB_NSEC_NORMAL, ISC_R_NOTFOUND, 35 }, - { "monker.", DNS_DB_NSEC_NSEC, "a.b.c.d.e.", DNS_DB_NSEC_NSEC, - ISC_R_NOTFOUND, 20 }, - { "monker.", DNS_DB_NSEC_NSEC3, "a.b.c.d.e.", DNS_DB_NSEC_NSEC3, - ISC_R_NOTFOUND, 5 }, + { "monker.", DNS_DBNAMESPACE_NORMAL, "a.b.c.d.e.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 35 }, + { "monker.", DNS_DBNAMESPACE_NSEC, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 20 }, + { "monker.", DNS_DBNAMESPACE_NSEC3, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 5 }, { NULL, 0, NULL, 0, 0, 0 } }; @@ -1135,242 +1141,242 @@ ISC_RUN_TEST_IMPL(predecessors) { /* second check: add a root label and try again */ const char root[16] = "."; - insert_name(qp, root, DNS_DB_NSEC_NORMAL); - insert_name(qp, root, DNS_DB_NSEC_NSEC); - insert_name(qp, root, DNS_DB_NSEC_NSEC3); + insert_name(qp, root, DNS_DBNAMESPACE_NORMAL); + insert_name(qp, root, DNS_DBNAMESPACE_NSEC); + insert_name(qp, root, DNS_DBNAMESPACE_NSEC3); i++; static struct check_predecessors check2[] = { - { ".", DNS_DB_NSEC_NORMAL, "moops.", DNS_DB_NSEC_NSEC3, + { ".", DNS_DBNAMESPACE_NORMAL, "moops.", DNS_DBNAMESPACE_NSEC3, ISC_R_SUCCESS, 0 }, - { ".", DNS_DB_NSEC_NSEC, "moops.", DNS_DB_NSEC_NORMAL, + { ".", DNS_DBNAMESPACE_NSEC, "moops.", DNS_DBNAMESPACE_NORMAL, ISC_R_SUCCESS, 32 }, - { ".", DNS_DB_NSEC_NSEC3, "moops.", DNS_DB_NSEC_NSEC, + { ".", DNS_DBNAMESPACE_NSEC3, "moops.", DNS_DBNAMESPACE_NSEC, ISC_R_SUCCESS, 16 }, - { "a.", DNS_DB_NSEC_NORMAL, ".", DNS_DB_NSEC_NORMAL, + { "a.", DNS_DBNAMESPACE_NORMAL, ".", DNS_DBNAMESPACE_NORMAL, ISC_R_SUCCESS, 47 }, - { "a.", DNS_DB_NSEC_NSEC, ".", DNS_DB_NSEC_NSEC, ISC_R_SUCCESS, - 31 }, - { "a.", DNS_DB_NSEC_NSEC3, ".", DNS_DB_NSEC_NSEC3, + { "a.", DNS_DBNAMESPACE_NSEC, ".", DNS_DBNAMESPACE_NSEC, + ISC_R_SUCCESS, 31 }, + { "a.", DNS_DBNAMESPACE_NSEC3, ".", DNS_DBNAMESPACE_NSEC3, ISC_R_SUCCESS, 15 }, - { "b.a.", DNS_DB_NSEC_NORMAL, "a.", DNS_DB_NSEC_NORMAL, + { "b.a.", DNS_DBNAMESPACE_NORMAL, "a.", DNS_DBNAMESPACE_NORMAL, ISC_R_SUCCESS, 46 }, - { "b.a.", DNS_DB_NSEC_NSEC, "a.", DNS_DB_NSEC_NSEC, + { "b.a.", DNS_DBNAMESPACE_NSEC, "a.", DNS_DBNAMESPACE_NSEC, ISC_R_SUCCESS, 30 }, - { "b.a.", DNS_DB_NSEC_NSEC3, "a.", DNS_DB_NSEC_NSEC3, + { "b.a.", DNS_DBNAMESPACE_NSEC3, "a.", DNS_DBNAMESPACE_NSEC3, ISC_R_SUCCESS, 14 }, - { "b.", DNS_DB_NSEC_NORMAL, "e.d.c.b.a.", DNS_DB_NSEC_NORMAL, - ISC_R_SUCCESS, 43 }, - { "b.", DNS_DB_NSEC_NSEC, "e.d.c.b.a.", DNS_DB_NSEC_NSEC, - ISC_R_SUCCESS, 27 }, - { "b.", DNS_DB_NSEC_NSEC3, "e.d.c.b.a.", DNS_DB_NSEC_NSEC3, - ISC_R_SUCCESS, 11 }, + { "b.", DNS_DBNAMESPACE_NORMAL, "e.d.c.b.a.", + DNS_DBNAMESPACE_NORMAL, ISC_R_SUCCESS, 43 }, + { "b.", DNS_DBNAMESPACE_NSEC, "e.d.c.b.a.", + DNS_DBNAMESPACE_NSEC, ISC_R_SUCCESS, 27 }, + { "b.", DNS_DBNAMESPACE_NSEC3, "e.d.c.b.a.", + DNS_DBNAMESPACE_NSEC3, ISC_R_SUCCESS, 11 }, - { "aaa.a.", DNS_DB_NSEC_NORMAL, "a.", DNS_DB_NSEC_NORMAL, - DNS_R_PARTIALMATCH, 46 }, - { "aaa.a.", DNS_DB_NSEC_NSEC, "a.", DNS_DB_NSEC_NSEC, + { "aaa.a.", DNS_DBNAMESPACE_NORMAL, "a.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 46 }, + { "aaa.a.", DNS_DBNAMESPACE_NSEC, "a.", DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 30 }, - { "aaa.a.", DNS_DB_NSEC_NSEC3, "a.", DNS_DB_NSEC_NSEC3, + { "aaa.a.", DNS_DBNAMESPACE_NSEC3, "a.", DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 14 }, - { "ddd.a.", DNS_DB_NSEC_NORMAL, "e.d.c.b.a.", - DNS_DB_NSEC_NORMAL, DNS_R_PARTIALMATCH, 43 }, - { "ddd.a.", DNS_DB_NSEC_NSEC, "e.d.c.b.a.", DNS_DB_NSEC_NSEC, - DNS_R_PARTIALMATCH, 27 }, - { "ddd.a.", DNS_DB_NSEC_NSEC3, "e.d.c.b.a.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 11 }, + { "ddd.a.", DNS_DBNAMESPACE_NORMAL, "e.d.c.b.a.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 43 }, + { "ddd.a.", DNS_DBNAMESPACE_NSEC, "e.d.c.b.a.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 27 }, + { "ddd.a.", DNS_DBNAMESPACE_NSEC3, "e.d.c.b.a.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 11 }, - { "d.c.", DNS_DB_NSEC_NORMAL, "c.b.b.", DNS_DB_NSEC_NORMAL, - DNS_R_PARTIALMATCH, 41 }, - { "d.c.", DNS_DB_NSEC_NSEC, "c.b.b.", DNS_DB_NSEC_NSEC, + { "d.c.", DNS_DBNAMESPACE_NORMAL, "c.b.b.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 41 }, + { "d.c.", DNS_DBNAMESPACE_NSEC, "c.b.b.", DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 25 }, - { "d.c.", DNS_DB_NSEC_NSEC3, "c.b.b.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 9 }, + { "d.c.", DNS_DBNAMESPACE_NSEC3, "c.b.b.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 9 }, - { "1.2.c.b.a.", DNS_DB_NSEC_NORMAL, "c.b.a.", - DNS_DB_NSEC_NORMAL, DNS_R_PARTIALMATCH, 44 }, - { "1.2.c.b.a.", DNS_DB_NSEC_NSEC, "c.b.a.", DNS_DB_NSEC_NSEC, - DNS_R_PARTIALMATCH, 28 }, - { "1.2.c.b.a.", DNS_DB_NSEC_NSEC3, "c.b.a.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 12 }, + { "1.2.c.b.a.", DNS_DBNAMESPACE_NORMAL, "c.b.a.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 44 }, + { "1.2.c.b.a.", DNS_DBNAMESPACE_NSEC, "c.b.a.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 28 }, + { "1.2.c.b.a.", DNS_DBNAMESPACE_NSEC3, "c.b.a.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 12 }, - { "a.b.c.e.f.", DNS_DB_NSEC_NORMAL, "a.b.c.d.e.", - DNS_DB_NSEC_NORMAL, DNS_R_PARTIALMATCH, 37 }, - { "a.b.c.e.f.", DNS_DB_NSEC_NSEC, "a.b.c.d.e.", - DNS_DB_NSEC_NSEC, DNS_R_PARTIALMATCH, 21 }, - { "a.b.c.e.f.", DNS_DB_NSEC_NSEC3, "a.b.c.d.e.", - DNS_DB_NSEC_NSEC3, DNS_R_PARTIALMATCH, 5 }, + { "a.b.c.e.f.", DNS_DBNAMESPACE_NORMAL, "a.b.c.d.e.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 37 }, + { "a.b.c.e.f.", DNS_DBNAMESPACE_NSEC, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 21 }, + { "a.b.c.e.f.", DNS_DBNAMESPACE_NSEC3, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 5 }, - { "z.y.x.", DNS_DB_NSEC_NORMAL, "moops.", DNS_DB_NSEC_NORMAL, - DNS_R_PARTIALMATCH, 32 }, - { "z.y.x.", DNS_DB_NSEC_NSEC, "moops.", DNS_DB_NSEC_NSEC, - DNS_R_PARTIALMATCH, 16 }, - { "z.y.x.", DNS_DB_NSEC_NSEC3, "moops.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 0 }, + { "z.y.x.", DNS_DBNAMESPACE_NORMAL, "moops.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 32 }, + { "z.y.x.", DNS_DBNAMESPACE_NSEC, "moops.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 16 }, + { "z.y.x.", DNS_DBNAMESPACE_NSEC3, "moops.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 0 }, - { "w.c.d.", DNS_DB_NSEC_NORMAL, "x.k.c.d.", DNS_DB_NSEC_NORMAL, - DNS_R_PARTIALMATCH, 38 }, - { "w.c.d.", DNS_DB_NSEC_NSEC, "x.k.c.d.", DNS_DB_NSEC_NSEC, - DNS_R_PARTIALMATCH, 22 }, - { "w.c.d.", DNS_DB_NSEC_NSEC3, "x.k.c.d.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 6 }, + { "w.c.d.", DNS_DBNAMESPACE_NORMAL, "x.k.c.d.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 38 }, + { "w.c.d.", DNS_DBNAMESPACE_NSEC, "x.k.c.d.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 22 }, + { "w.c.d.", DNS_DBNAMESPACE_NSEC3, "x.k.c.d.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 6 }, - { "z.z.z.z.k.c.d.", DNS_DB_NSEC_NORMAL, "x.k.c.d.", - DNS_DB_NSEC_NORMAL, DNS_R_PARTIALMATCH, 38 }, - { "z.z.z.z.k.c.d.", DNS_DB_NSEC_NSEC, "x.k.c.d.", - DNS_DB_NSEC_NSEC, DNS_R_PARTIALMATCH, 22 }, - { "z.z.z.z.k.c.d.", DNS_DB_NSEC_NSEC3, "x.k.c.d.", - DNS_DB_NSEC_NSEC3, DNS_R_PARTIALMATCH, 6 }, + { "z.z.z.z.k.c.d.", DNS_DBNAMESPACE_NORMAL, "x.k.c.d.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 38 }, + { "z.z.z.z.k.c.d.", DNS_DBNAMESPACE_NSEC, "x.k.c.d.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 22 }, + { "z.z.z.z.k.c.d.", DNS_DBNAMESPACE_NSEC3, "x.k.c.d.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 6 }, - { "w.k.c.d.", DNS_DB_NSEC_NORMAL, "a.b.c.d.", - DNS_DB_NSEC_NORMAL, DNS_R_PARTIALMATCH, 39 }, - { "w.k.c.d.", DNS_DB_NSEC_NSEC, "a.b.c.d.", DNS_DB_NSEC_NSEC, - DNS_R_PARTIALMATCH, 23 }, - { "w.k.c.d.", DNS_DB_NSEC_NSEC3, "a.b.c.d.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 7 }, + { "w.k.c.d.", DNS_DBNAMESPACE_NORMAL, "a.b.c.d.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 39 }, + { "w.k.c.d.", DNS_DBNAMESPACE_NSEC, "a.b.c.d.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 23 }, + { "w.k.c.d.", DNS_DBNAMESPACE_NSEC3, "a.b.c.d.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 7 }, - { "d.a.", DNS_DB_NSEC_NORMAL, "e.d.c.b.a.", DNS_DB_NSEC_NORMAL, - DNS_R_PARTIALMATCH, 43 }, - { "d.a.", DNS_DB_NSEC_NSEC, "e.d.c.b.a.", DNS_DB_NSEC_NSEC, - DNS_R_PARTIALMATCH, 27 }, - { "d.a.", DNS_DB_NSEC_NSEC3, "e.d.c.b.a.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 11 }, + { "d.a.", DNS_DBNAMESPACE_NORMAL, "e.d.c.b.a.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 43 }, + { "d.a.", DNS_DBNAMESPACE_NSEC, "e.d.c.b.a.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 27 }, + { "d.a.", DNS_DBNAMESPACE_NSEC3, "e.d.c.b.a.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 11 }, - { "0.b.c.d.e.", DNS_DB_NSEC_NORMAL, "x.k.c.d.", - DNS_DB_NSEC_NORMAL, DNS_R_PARTIALMATCH, 38 }, - { "0.b.c.d.e.", DNS_DB_NSEC_NSEC, "x.k.c.d.", DNS_DB_NSEC_NSEC, - DNS_R_PARTIALMATCH, 22 }, - { "0.b.c.d.e.", DNS_DB_NSEC_NSEC3, "x.k.c.d.", - DNS_DB_NSEC_NSEC3, DNS_R_PARTIALMATCH, 6 }, + { "0.b.c.d.e.", DNS_DBNAMESPACE_NORMAL, "x.k.c.d.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 38 }, + { "0.b.c.d.e.", DNS_DBNAMESPACE_NSEC, "x.k.c.d.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 22 }, + { "0.b.c.d.e.", DNS_DBNAMESPACE_NSEC3, "x.k.c.d.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 6 }, - { "b.d.", DNS_DB_NSEC_NORMAL, "c.b.b.", DNS_DB_NSEC_NORMAL, - DNS_R_PARTIALMATCH, 41 }, - { "b.d.", DNS_DB_NSEC_NSEC, "c.b.b.", DNS_DB_NSEC_NSEC, + { "b.d.", DNS_DBNAMESPACE_NORMAL, "c.b.b.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 41 }, + { "b.d.", DNS_DBNAMESPACE_NSEC, "c.b.b.", DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 25 }, - { "b.d.", DNS_DB_NSEC_NSEC3, "c.b.b.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 9 }, + { "b.d.", DNS_DBNAMESPACE_NSEC3, "c.b.b.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 9 }, - { "mon.", DNS_DB_NSEC_NORMAL, "a.b.c.d.e.", DNS_DB_NSEC_NORMAL, - DNS_R_PARTIALMATCH, 37 }, - { "mon.", DNS_DB_NSEC_NSEC, "a.b.c.d.e.", DNS_DB_NSEC_NSEC, - DNS_R_PARTIALMATCH, 21 }, - { "mon.", DNS_DB_NSEC_NSEC3, "a.b.c.d.e.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 5 }, + { "mon.", DNS_DBNAMESPACE_NORMAL, "a.b.c.d.e.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 37 }, + { "mon.", DNS_DBNAMESPACE_NSEC, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 21 }, + { "mon.", DNS_DBNAMESPACE_NSEC3, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 5 }, - { "moor.", DNS_DB_NSEC_NORMAL, "moops.", DNS_DB_NSEC_NORMAL, - DNS_R_PARTIALMATCH, 32 }, - { "moor.", DNS_DB_NSEC_NSEC, "moops.", DNS_DB_NSEC_NSEC, + { "moor.", DNS_DBNAMESPACE_NORMAL, "moops.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 32 }, + { "moor.", DNS_DBNAMESPACE_NSEC, "moops.", DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 16 }, - { "moor.", DNS_DB_NSEC_NSEC3, "moops.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 0 }, + { "moor.", DNS_DBNAMESPACE_NSEC3, "moops.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 0 }, - { "mopbop.", DNS_DB_NSEC_NORMAL, "moops.", DNS_DB_NSEC_NORMAL, - DNS_R_PARTIALMATCH, 32 }, - { "mopbop.", DNS_DB_NSEC_NSEC, "moops.", DNS_DB_NSEC_NSEC, + { "mopbop.", DNS_DBNAMESPACE_NORMAL, "moops.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 32 }, + { "mopbop.", DNS_DBNAMESPACE_NSEC, "moops.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 16 }, + { "mopbop.", DNS_DBNAMESPACE_NSEC3, "moops.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 0 }, + + { "moppop.", DNS_DBNAMESPACE_NORMAL, "moops.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 32 }, + { "moppop.", DNS_DBNAMESPACE_NSEC, "moops.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 16 }, + { "moppop.", DNS_DBNAMESPACE_NSEC3, "moops.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 0 }, + + { "mopps.", DNS_DBNAMESPACE_NORMAL, "moops.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 32 }, + { "mopps.", DNS_DBNAMESPACE_NSEC, "moops.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 16 }, + { "mopps.", DNS_DBNAMESPACE_NSEC3, "moops.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 0 }, + + { "mopzop.", DNS_DBNAMESPACE_NORMAL, "moops.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 32 }, + { "mopzop.", DNS_DBNAMESPACE_NSEC, "moops.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 16 }, + { "mopzop.", DNS_DBNAMESPACE_NSEC3, "moops.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 0 }, + + { "mop.", DNS_DBNAMESPACE_NORMAL, "moops.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 32 }, + { "mop.", DNS_DBNAMESPACE_NSEC, "moops.", DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 16 }, - { "mopbop.", DNS_DB_NSEC_NSEC3, "moops.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 0 }, + { "mop.", DNS_DBNAMESPACE_NSEC3, "moops.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 0 }, - { "moppop.", DNS_DB_NSEC_NORMAL, "moops.", DNS_DB_NSEC_NORMAL, - DNS_R_PARTIALMATCH, 32 }, - { "moppop.", DNS_DB_NSEC_NSEC, "moops.", DNS_DB_NSEC_NSEC, - DNS_R_PARTIALMATCH, 16 }, - { "moppop.", DNS_DB_NSEC_NSEC3, "moops.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 0 }, + { "monbop.", DNS_DBNAMESPACE_NORMAL, "a.b.c.d.e.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 37 }, + { "monbop.", DNS_DBNAMESPACE_NSEC, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 21 }, + { "monbop.", DNS_DBNAMESPACE_NSEC3, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 5 }, - { "mopps.", DNS_DB_NSEC_NORMAL, "moops.", DNS_DB_NSEC_NORMAL, - DNS_R_PARTIALMATCH, 32 }, - { "mopps.", DNS_DB_NSEC_NSEC, "moops.", DNS_DB_NSEC_NSEC, - DNS_R_PARTIALMATCH, 16 }, - { "mopps.", DNS_DB_NSEC_NSEC3, "moops.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 0 }, + { "monpop.", DNS_DBNAMESPACE_NORMAL, "a.b.c.d.e.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 37 }, + { "monpop.", DNS_DBNAMESPACE_NSEC, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 21 }, + { "monpop.", DNS_DBNAMESPACE_NSEC3, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 5 }, - { "mopzop.", DNS_DB_NSEC_NORMAL, "moops.", DNS_DB_NSEC_NORMAL, - DNS_R_PARTIALMATCH, 32 }, - { "mopzop.", DNS_DB_NSEC_NSEC, "moops.", DNS_DB_NSEC_NSEC, - DNS_R_PARTIALMATCH, 16 }, - { "mopzop.", DNS_DB_NSEC_NSEC3, "moops.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 0 }, + { "monps.", DNS_DBNAMESPACE_NORMAL, "a.b.c.d.e.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 37 }, + { "monps.", DNS_DBNAMESPACE_NSEC, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 21 }, + { "monps.", DNS_DBNAMESPACE_NSEC3, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 5 }, - { "mop.", DNS_DB_NSEC_NORMAL, "moops.", DNS_DB_NSEC_NORMAL, - DNS_R_PARTIALMATCH, 32 }, - { "mop.", DNS_DB_NSEC_NSEC, "moops.", DNS_DB_NSEC_NSEC, - DNS_R_PARTIALMATCH, 16 }, - { "mop.", DNS_DB_NSEC_NSEC3, "moops.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 0 }, + { "monzop.", DNS_DBNAMESPACE_NORMAL, "a.b.c.d.e.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 37 }, + { "monzop.", DNS_DBNAMESPACE_NSEC, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 21 }, + { "monzop.", DNS_DBNAMESPACE_NSEC3, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 5 }, - { "monbop.", DNS_DB_NSEC_NORMAL, "a.b.c.d.e.", - DNS_DB_NSEC_NORMAL, DNS_R_PARTIALMATCH, 37 }, - { "monbop.", DNS_DB_NSEC_NSEC, "a.b.c.d.e.", DNS_DB_NSEC_NSEC, - DNS_R_PARTIALMATCH, 21 }, - { "monbop.", DNS_DB_NSEC_NSEC3, "a.b.c.d.e.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 5 }, + { "mon.", DNS_DBNAMESPACE_NORMAL, "a.b.c.d.e.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 37 }, + { "mon.", DNS_DBNAMESPACE_NSEC, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 21 }, + { "mon.", DNS_DBNAMESPACE_NSEC3, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 5 }, - { "monpop.", DNS_DB_NSEC_NORMAL, "a.b.c.d.e.", - DNS_DB_NSEC_NORMAL, DNS_R_PARTIALMATCH, 37 }, - { "monpop.", DNS_DB_NSEC_NSEC, "a.b.c.d.e.", DNS_DB_NSEC_NSEC, - DNS_R_PARTIALMATCH, 21 }, - { "monpop.", DNS_DB_NSEC_NSEC3, "a.b.c.d.e.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 5 }, - - { "monps.", DNS_DB_NSEC_NORMAL, "a.b.c.d.e.", - DNS_DB_NSEC_NORMAL, DNS_R_PARTIALMATCH, 37 }, - { "monps.", DNS_DB_NSEC_NSEC, "a.b.c.d.e.", DNS_DB_NSEC_NSEC, - DNS_R_PARTIALMATCH, 21 }, - { "monps.", DNS_DB_NSEC_NSEC3, "a.b.c.d.e.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 5 }, - - { "monzop.", DNS_DB_NSEC_NORMAL, "a.b.c.d.e.", - DNS_DB_NSEC_NORMAL, DNS_R_PARTIALMATCH, 37 }, - { "monzop.", DNS_DB_NSEC_NSEC, "a.b.c.d.e.", DNS_DB_NSEC_NSEC, - DNS_R_PARTIALMATCH, 21 }, - { "monzop.", DNS_DB_NSEC_NSEC3, "a.b.c.d.e.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 5 }, - - { "mon.", DNS_DB_NSEC_NORMAL, "a.b.c.d.e.", DNS_DB_NSEC_NORMAL, - DNS_R_PARTIALMATCH, 37 }, - { "mon.", DNS_DB_NSEC_NSEC, "a.b.c.d.e.", DNS_DB_NSEC_NSEC, - DNS_R_PARTIALMATCH, 21 }, - { "mon.", DNS_DB_NSEC_NSEC3, "a.b.c.d.e.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 5 }, - - { "moop.", DNS_DB_NSEC_NORMAL, "moon.", DNS_DB_NSEC_NORMAL, - DNS_R_PARTIALMATCH, 33 }, - { "moop.", DNS_DB_NSEC_NSEC, "moon.", DNS_DB_NSEC_NSEC, + { "moop.", DNS_DBNAMESPACE_NORMAL, "moon.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 33 }, + { "moop.", DNS_DBNAMESPACE_NSEC, "moon.", DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 17 }, - { "moop.", DNS_DB_NSEC_NSEC3, "moon.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 1 }, + { "moop.", DNS_DBNAMESPACE_NSEC3, "moon.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 1 }, - { "moopser.", DNS_DB_NSEC_NORMAL, "moops.", DNS_DB_NSEC_NORMAL, - DNS_R_PARTIALMATCH, 32 }, - { "moopser.", DNS_DB_NSEC_NSEC, "moops.", DNS_DB_NSEC_NSEC, - DNS_R_PARTIALMATCH, 16 }, - { "moopser.", DNS_DB_NSEC_NSEC3, "moops.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 0 }, + { "moopser.", DNS_DBNAMESPACE_NORMAL, "moops.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 32 }, + { "moopser.", DNS_DBNAMESPACE_NSEC, "moops.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 16 }, + { "moopser.", DNS_DBNAMESPACE_NSEC3, "moops.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 0 }, - { "monky.", DNS_DB_NSEC_NORMAL, "a.b.c.d.e.", - DNS_DB_NSEC_NORMAL, DNS_R_PARTIALMATCH, 37 }, - { "monky.", DNS_DB_NSEC_NSEC, "a.b.c.d.e.", DNS_DB_NSEC_NSEC, - DNS_R_PARTIALMATCH, 21 }, - { "monky.", DNS_DB_NSEC_NSEC3, "a.b.c.d.e.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 5 }, + { "monky.", DNS_DBNAMESPACE_NORMAL, "a.b.c.d.e.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 37 }, + { "monky.", DNS_DBNAMESPACE_NSEC, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 21 }, + { "monky.", DNS_DBNAMESPACE_NSEC3, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 5 }, - { "monkey.", DNS_DB_NSEC_NORMAL, "a.b.c.d.e.", - DNS_DB_NSEC_NORMAL, DNS_R_PARTIALMATCH, 37 }, - { "monkey.", DNS_DB_NSEC_NSEC, "a.b.c.d.e.", DNS_DB_NSEC_NSEC, - DNS_R_PARTIALMATCH, 21 }, - { "monkey.", DNS_DB_NSEC_NSEC3, "a.b.c.d.e.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 5 }, + { "monkey.", DNS_DBNAMESPACE_NORMAL, "a.b.c.d.e.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 37 }, + { "monkey.", DNS_DBNAMESPACE_NSEC, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 21 }, + { "monkey.", DNS_DBNAMESPACE_NSEC3, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 5 }, - { "monker.", DNS_DB_NSEC_NORMAL, "a.b.c.d.e.", - DNS_DB_NSEC_NORMAL, DNS_R_PARTIALMATCH, 37 }, - { "monker.", DNS_DB_NSEC_NSEC, "a.b.c.d.e.", DNS_DB_NSEC_NSEC, - DNS_R_PARTIALMATCH, 21 }, - { "monker.", DNS_DB_NSEC_NSEC3, "a.b.c.d.e.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 5 }, + { "monker.", DNS_DBNAMESPACE_NORMAL, "a.b.c.d.e.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 37 }, + { "monker.", DNS_DBNAMESPACE_NSEC, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 21 }, + { "monker.", DNS_DBNAMESPACE_NSEC3, "a.b.c.d.e.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 5 }, { NULL, 0, NULL, 0, 0, 0 } }; @@ -1408,61 +1414,61 @@ ISC_RUN_TEST_IMPL(fixiterator) { dns_qp_create(mctx, &string_methods, NULL, &qp); while (insert1[i][0] != '\0') { - insert_name(qp, insert1[i], DNS_DB_NSEC_NORMAL); - insert_name(qp, insert1[i], DNS_DB_NSEC_NSEC); - insert_name(qp, insert1[i], DNS_DB_NSEC_NSEC3); + insert_name(qp, insert1[i], DNS_DBNAMESPACE_NORMAL); + insert_name(qp, insert1[i], DNS_DBNAMESPACE_NSEC); + insert_name(qp, insert1[i], DNS_DBNAMESPACE_NSEC3); i++; } static struct check_predecessors check1[] = { - { "newtext.dynamic.", DNS_DB_NSEC_NORMAL, "mx.dynamic.", - DNS_DB_NSEC_NORMAL, DNS_R_PARTIALMATCH, 41 }, - { "newtext.dynamic.", DNS_DB_NSEC_NSEC, "mx.dynamic.", - DNS_DB_NSEC_NSEC, DNS_R_PARTIALMATCH, 24 }, - { "newtext.dynamic.", DNS_DB_NSEC_NSEC3, "mx.dynamic.", - DNS_DB_NSEC_NSEC3, DNS_R_PARTIALMATCH, 7 }, + { "newtext.dynamic.", DNS_DBNAMESPACE_NORMAL, "mx.dynamic.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 41 }, + { "newtext.dynamic.", DNS_DBNAMESPACE_NSEC, "mx.dynamic.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 24 }, + { "newtext.dynamic.", DNS_DBNAMESPACE_NSEC3, "mx.dynamic.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 7 }, - { "nsd.dynamic.", DNS_DB_NSEC_NORMAL, "ns.dynamic.", - DNS_DB_NSEC_NORMAL, DNS_R_PARTIALMATCH, 40 }, - { "nsd.dynamic.", DNS_DB_NSEC_NSEC, "ns.dynamic.", - DNS_DB_NSEC_NSEC, DNS_R_PARTIALMATCH, 23 }, - { "nsd.dynamic.", DNS_DB_NSEC_NSEC3, "ns.dynamic.", - DNS_DB_NSEC_NSEC3, DNS_R_PARTIALMATCH, 6 }, + { "nsd.dynamic.", DNS_DBNAMESPACE_NORMAL, "ns.dynamic.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 40 }, + { "nsd.dynamic.", DNS_DBNAMESPACE_NSEC, "ns.dynamic.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 23 }, + { "nsd.dynamic.", DNS_DBNAMESPACE_NSEC3, "ns.dynamic.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 6 }, - { "nsf.dynamic.", DNS_DB_NSEC_NORMAL, "nsec.dynamic.", - DNS_DB_NSEC_NORMAL, DNS_R_PARTIALMATCH, 39 }, - { "nsf.dynamic.", DNS_DB_NSEC_NSEC, "nsec.dynamic.", - DNS_DB_NSEC_NSEC, DNS_R_PARTIALMATCH, 22 }, - { "nsf.dynamic.", DNS_DB_NSEC_NSEC3, "nsec.dynamic.", - DNS_DB_NSEC_NSEC3, DNS_R_PARTIALMATCH, 5 }, + { "nsf.dynamic.", DNS_DBNAMESPACE_NORMAL, "nsec.dynamic.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 39 }, + { "nsf.dynamic.", DNS_DBNAMESPACE_NSEC, "nsec.dynamic.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 22 }, + { "nsf.dynamic.", DNS_DBNAMESPACE_NSEC3, "nsec.dynamic.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 5 }, - { "d.", DNS_DB_NSEC_NORMAL, "trailing.", DNS_DB_NSEC_NSEC3, - ISC_R_NOTFOUND, 0 }, - { "d.", DNS_DB_NSEC_NSEC, "trailing.", DNS_DB_NSEC_NORMAL, - ISC_R_NOTFOUND, 34 }, - { "d.", DNS_DB_NSEC_NSEC3, "trailing.", DNS_DB_NSEC_NSEC, - ISC_R_NOTFOUND, 17 }, + { "d.", DNS_DBNAMESPACE_NORMAL, "trailing.", + DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 0 }, + { "d.", DNS_DBNAMESPACE_NSEC, "trailing.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 34 }, + { "d.", DNS_DBNAMESPACE_NSEC3, "trailing.", + DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 17 }, - { "absent.", DNS_DB_NSEC_NORMAL, "trailing.", DNS_DB_NSEC_NSEC3, - ISC_R_NOTFOUND, 0 }, - { "absent.", DNS_DB_NSEC_NSEC, "trailing.", DNS_DB_NSEC_NORMAL, - ISC_R_NOTFOUND, 34 }, - { "absent.", DNS_DB_NSEC_NSEC3, "trailing.", DNS_DB_NSEC_NSEC, - ISC_R_NOTFOUND, 17 }, + { "absent.", DNS_DBNAMESPACE_NORMAL, "trailing.", + DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 0 }, + { "absent.", DNS_DBNAMESPACE_NSEC, "trailing.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 34 }, + { "absent.", DNS_DBNAMESPACE_NSEC3, "trailing.", + DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 17 }, - { "nonexistent.", DNS_DB_NSEC_NORMAL, "txt.dynamic.", - DNS_DB_NSEC_NORMAL, ISC_R_NOTFOUND, 35 }, - { "nonexistent.", DNS_DB_NSEC_NSEC, "txt.dynamic.", - DNS_DB_NSEC_NSEC, ISC_R_NOTFOUND, 18 }, - { "nonexistent.", DNS_DB_NSEC_NSEC3, "txt.dynamic.", - DNS_DB_NSEC_NSEC3, ISC_R_NOTFOUND, 1 }, + { "nonexistent.", DNS_DBNAMESPACE_NORMAL, "txt.dynamic.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 35 }, + { "nonexistent.", DNS_DBNAMESPACE_NSEC, "txt.dynamic.", + DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 18 }, + { "nonexistent.", DNS_DBNAMESPACE_NSEC3, "txt.dynamic.", + DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 1 }, - { "wayback.", DNS_DB_NSEC_NORMAL, "trailing.", - DNS_DB_NSEC_NORMAL, ISC_R_NOTFOUND, 34 }, - { "wayback.", DNS_DB_NSEC_NSEC, "trailing.", DNS_DB_NSEC_NSEC, - ISC_R_NOTFOUND, 17 }, - { "wayback.", DNS_DB_NSEC_NSEC3, "trailing.", DNS_DB_NSEC_NSEC3, - ISC_R_NOTFOUND, 0 }, + { "wayback.", DNS_DBNAMESPACE_NORMAL, "trailing.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 34 }, + { "wayback.", DNS_DBNAMESPACE_NSEC, "trailing.", + DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 17 }, + { "wayback.", DNS_DBNAMESPACE_NSEC3, "trailing.", + DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 0 }, { NULL, 0, NULL, 0, 0, 0 } }; @@ -1475,39 +1481,39 @@ ISC_RUN_TEST_IMPL(fixiterator) { dns_qp_create(mctx, &string_methods, NULL, &qp); while (insert2[i][0] != '\0') { - insert_name(qp, insert2[i], DNS_DB_NSEC_NORMAL); - insert_name(qp, insert2[i], DNS_DB_NSEC_NSEC); - insert_name(qp, insert2[i], DNS_DB_NSEC_NSEC3); + insert_name(qp, insert2[i], DNS_DBNAMESPACE_NORMAL); + insert_name(qp, insert2[i], DNS_DBNAMESPACE_NSEC); + insert_name(qp, insert2[i], DNS_DBNAMESPACE_NSEC3); i++; } static struct check_predecessors check2[] = { - { "acb.", DNS_DB_NSEC_NORMAL, "abc.", DNS_DB_NSEC_NORMAL, - DNS_R_PARTIALMATCH, 6 }, - { "acb.", DNS_DB_NSEC_NSEC, "abc.", DNS_DB_NSEC_NSEC, + { "acb.", DNS_DBNAMESPACE_NORMAL, "abc.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 6 }, + { "acb.", DNS_DBNAMESPACE_NSEC, "abc.", DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 3 }, - { "acb.", DNS_DB_NSEC_NSEC3, "abc.", DNS_DB_NSEC_NSEC3, + { "acb.", DNS_DBNAMESPACE_NSEC3, "abc.", DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 0 }, - { "acc.", DNS_DB_NSEC_NORMAL, "abc.", DNS_DB_NSEC_NORMAL, - DNS_R_PARTIALMATCH, 6 }, - { "acc.", DNS_DB_NSEC_NSEC, "abc.", DNS_DB_NSEC_NSEC, + { "acc.", DNS_DBNAMESPACE_NORMAL, "abc.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 6 }, + { "acc.", DNS_DBNAMESPACE_NSEC, "abc.", DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 3 }, - { "acc.", DNS_DB_NSEC_NSEC3, "abc.", DNS_DB_NSEC_NSEC3, + { "acc.", DNS_DBNAMESPACE_NSEC3, "abc.", DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 0 }, - { "abbb.", DNS_DB_NSEC_NORMAL, "abb.", DNS_DB_NSEC_NORMAL, - DNS_R_PARTIALMATCH, 7 }, - { "abbb.", DNS_DB_NSEC_NSEC, "abb.", DNS_DB_NSEC_NSEC, + { "abbb.", DNS_DBNAMESPACE_NORMAL, "abb.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 7 }, + { "abbb.", DNS_DBNAMESPACE_NSEC, "abb.", DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 4 }, - { "abbb.", DNS_DB_NSEC_NSEC3, "abb.", DNS_DB_NSEC_NSEC3, + { "abbb.", DNS_DBNAMESPACE_NSEC3, "abb.", DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 1 }, - { "aab.", DNS_DB_NSEC_NORMAL, ".", DNS_DB_NSEC_NORMAL, + { "aab.", DNS_DBNAMESPACE_NORMAL, ".", DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 8 }, - { "aab.", DNS_DB_NSEC_NSEC, ".", DNS_DB_NSEC_NSEC, + { "aab.", DNS_DBNAMESPACE_NSEC, ".", DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 5 }, - { "aab.", DNS_DB_NSEC_NSEC3, ".", DNS_DB_NSEC_NSEC3, + { "aab.", DNS_DBNAMESPACE_NSEC3, ".", DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 2 }, { NULL, 0, NULL, 0, 0, 0 } @@ -1526,21 +1532,21 @@ ISC_RUN_TEST_IMPL(fixiterator) { dns_qp_create(mctx, &string_methods, NULL, &qp); while (insert3[i][0] != '\0') { - insert_name(qp, insert3[i], DNS_DB_NSEC_NORMAL); - insert_name(qp, insert3[i], DNS_DB_NSEC_NSEC); - insert_name(qp, insert3[i], DNS_DB_NSEC_NSEC3); + insert_name(qp, insert3[i], DNS_DBNAMESPACE_NORMAL); + insert_name(qp, insert3[i], DNS_DBNAMESPACE_NSEC); + insert_name(qp, insert3[i], DNS_DBNAMESPACE_NSEC3); i++; } static struct check_predecessors check3[] = { - { "key-is-21556.example.", DNS_DB_NSEC_NORMAL, - "key-is-14779.example.", DNS_DB_NSEC_NORMAL, + { "key-is-21556.example.", DNS_DBNAMESPACE_NORMAL, + "key-is-14779.example.", DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 12 }, - { "key-is-21556.example.", DNS_DB_NSEC_NSEC, - "key-is-14779.example.", DNS_DB_NSEC_NSEC, DNS_R_PARTIALMATCH, - 7 }, - { "key-is-21556.example.", DNS_DB_NSEC_NSEC3, - "key-is-14779.example.", DNS_DB_NSEC_NSEC3, + { "key-is-21556.example.", DNS_DBNAMESPACE_NSEC, + "key-is-14779.example.", DNS_DBNAMESPACE_NSEC, + DNS_R_PARTIALMATCH, 7 }, + { "key-is-21556.example.", DNS_DBNAMESPACE_NSEC3, + "key-is-14779.example.", DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 2 }, { NULL, 0, NULL, 0, 0, 0 } }; @@ -1554,46 +1560,46 @@ ISC_RUN_TEST_IMPL(fixiterator) { dns_qp_create(mctx, &string_methods, NULL, &qp); while (insert4[i][0] != '\0') { - insert_name(qp, insert4[i], DNS_DB_NSEC_NORMAL); - insert_name(qp, insert4[i], DNS_DB_NSEC_NSEC); - insert_name(qp, insert4[i], DNS_DB_NSEC_NSEC3); + insert_name(qp, insert4[i], DNS_DBNAMESPACE_NORMAL); + insert_name(qp, insert4[i], DNS_DBNAMESPACE_NSEC); + insert_name(qp, insert4[i], DNS_DBNAMESPACE_NSEC3); i++; } static struct check_predecessors check4[] = { - { "\\007.", DNS_DB_NSEC_NORMAL, "\\000\\009.", - DNS_DB_NSEC_NORMAL, DNS_R_PARTIALMATCH, 8 }, - { "\\007.", DNS_DB_NSEC_NSEC, "\\000\\009.", DNS_DB_NSEC_NSEC, - DNS_R_PARTIALMATCH, 4 }, - { "\\007.", DNS_DB_NSEC_NSEC3, "\\000\\009.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 0 }, + { "\\007.", DNS_DBNAMESPACE_NORMAL, "\\000\\009.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 8 }, + { "\\007.", DNS_DBNAMESPACE_NSEC, "\\000\\009.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 4 }, + { "\\007.", DNS_DBNAMESPACE_NSEC3, "\\000\\009.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 0 }, - { "\\009.", DNS_DB_NSEC_NORMAL, "\\000\\009.", - DNS_DB_NSEC_NORMAL, DNS_R_PARTIALMATCH, 8 }, - { "\\009.", DNS_DB_NSEC_NSEC, "\\000\\009.", DNS_DB_NSEC_NSEC, - DNS_R_PARTIALMATCH, 4 }, - { "\\009.", DNS_DB_NSEC_NSEC3, "\\000\\009.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 0 }, + { "\\009.", DNS_DBNAMESPACE_NORMAL, "\\000\\009.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 8 }, + { "\\009.", DNS_DBNAMESPACE_NSEC, "\\000\\009.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 4 }, + { "\\009.", DNS_DBNAMESPACE_NSEC3, "\\000\\009.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 0 }, - { "\\045.", DNS_DB_NSEC_NORMAL, "\\000\\009.", - DNS_DB_NSEC_NORMAL, DNS_R_PARTIALMATCH, 8 }, - { "\\045.", DNS_DB_NSEC_NSEC, "\\000\\009.", DNS_DB_NSEC_NSEC, - DNS_R_PARTIALMATCH, 4 }, - { "\\045.", DNS_DB_NSEC_NSEC3, "\\000\\009.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 0 }, + { "\\045.", DNS_DBNAMESPACE_NORMAL, "\\000\\009.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 8 }, + { "\\045.", DNS_DBNAMESPACE_NSEC, "\\000\\009.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 4 }, + { "\\045.", DNS_DBNAMESPACE_NSEC3, "\\000\\009.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 0 }, - { "\\044.", DNS_DB_NSEC_NORMAL, "\\000\\009.", - DNS_DB_NSEC_NORMAL, DNS_R_PARTIALMATCH, 8 }, - { "\\044.", DNS_DB_NSEC_NSEC, "\\000\\009.", DNS_DB_NSEC_NSEC, - DNS_R_PARTIALMATCH, 4 }, - { "\\044.", DNS_DB_NSEC_NSEC3, "\\000\\009.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 0 }, + { "\\044.", DNS_DBNAMESPACE_NORMAL, "\\000\\009.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 8 }, + { "\\044.", DNS_DBNAMESPACE_NSEC, "\\000\\009.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 4 }, + { "\\044.", DNS_DBNAMESPACE_NSEC3, "\\000\\009.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 0 }, - { "\\000.", DNS_DB_NSEC_NORMAL, ".", DNS_DB_NSEC_NORMAL, + { "\\000.", DNS_DBNAMESPACE_NORMAL, ".", DNS_DBNAMESPACE_NORMAL, ISC_R_SUCCESS, 11 }, - { "\\000.", DNS_DB_NSEC_NSEC, ".", DNS_DB_NSEC_NSEC, + { "\\000.", DNS_DBNAMESPACE_NSEC, ".", DNS_DBNAMESPACE_NSEC, ISC_R_SUCCESS, 7 }, - { "\\000.", DNS_DB_NSEC_NSEC3, ".", DNS_DB_NSEC_NSEC3, + { "\\000.", DNS_DBNAMESPACE_NSEC3, ".", DNS_DBNAMESPACE_NSEC3, ISC_R_SUCCESS, 3 }, { NULL, 0, NULL, 0, 0, 0 }, @@ -1643,19 +1649,19 @@ ISC_RUN_TEST_IMPL(qpkey_delete) { int i = 0; dns_qp_t *qp = NULL; static struct inserting insert1[] = { - { "a.", DNS_DB_NSEC_NORMAL, 0, 0 }, - { "b.", DNS_DB_NSEC_NORMAL, 0, 0 }, - { "b.", DNS_DB_NSEC_NSEC, 0, 0 }, - { "b.", DNS_DB_NSEC_NSEC3, 0, 0 }, - { "b.a.", DNS_DB_NSEC_NORMAL, 0, 0 }, - { "b.a.", DNS_DB_NSEC_NSEC, 0, 0 }, - { "c.b.a.", DNS_DB_NSEC_NORMAL, 0, 0 }, - { "e.d.c.b.a.", DNS_DB_NSEC_NORMAL, 0, 0 }, - { "e.d.c.b.a.", DNS_DB_NSEC_NSEC, 0, 0 }, - { "c.b.b.", DNS_DB_NSEC_NSEC3, 0, 0 }, - { "c.d.", DNS_DB_NSEC_NSEC3, 0, 0 }, - { "a.b.c.d.", DNS_DB_NSEC_NORMAL, 0, 0 }, - { "a.b.c.d.e.", DNS_DB_NSEC_NORMAL, 0, 0 }, + { "a.", DNS_DBNAMESPACE_NORMAL, 0, 0 }, + { "b.", DNS_DBNAMESPACE_NORMAL, 0, 0 }, + { "b.", DNS_DBNAMESPACE_NSEC, 0, 0 }, + { "b.", DNS_DBNAMESPACE_NSEC3, 0, 0 }, + { "b.a.", DNS_DBNAMESPACE_NORMAL, 0, 0 }, + { "b.a.", DNS_DBNAMESPACE_NSEC, 0, 0 }, + { "c.b.a.", DNS_DBNAMESPACE_NORMAL, 0, 0 }, + { "e.d.c.b.a.", DNS_DBNAMESPACE_NORMAL, 0, 0 }, + { "e.d.c.b.a.", DNS_DBNAMESPACE_NSEC, 0, 0 }, + { "c.b.b.", DNS_DBNAMESPACE_NSEC3, 0, 0 }, + { "c.d.", DNS_DBNAMESPACE_NSEC3, 0, 0 }, + { "a.b.c.d.", DNS_DBNAMESPACE_NORMAL, 0, 0 }, + { "a.b.c.d.e.", DNS_DBNAMESPACE_NORMAL, 0, 0 }, { "", 0, 0, 0 }, }; /* @@ -1685,157 +1691,181 @@ ISC_RUN_TEST_IMPL(qpkey_delete) { /* lookup checks before deleting */ static struct check_qpchain chain1[] = { - { ".", DNS_DB_NSEC_NORMAL, ISC_R_NOTFOUND, 0, { NULL } }, - { ".", DNS_DB_NSEC_NSEC, ISC_R_NOTFOUND, 0, { NULL } }, - { ".", DNS_DB_NSEC_NSEC3, ISC_R_NOTFOUND, 0, { NULL } }, + { ".", DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 0, { NULL } }, + { ".", DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 0, { NULL } }, + { ".", DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 0, { NULL } }, - { "a.", DNS_DB_NSEC_NORMAL, ISC_R_SUCCESS, 1, { "a." } }, - { "a.", DNS_DB_NSEC_NSEC, ISC_R_NOTFOUND, 0, { NULL } }, /* b.a. - */ - { "a.", DNS_DB_NSEC_NSEC3, ISC_R_NOTFOUND, 0, { NULL } }, + { "a.", DNS_DBNAMESPACE_NORMAL, ISC_R_SUCCESS, 1, { "a." } }, + { "a.", + DNS_DBNAMESPACE_NSEC, + ISC_R_NOTFOUND, + 0, + { NULL } }, /* b.a. + */ + { "a.", DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 0, { NULL } }, - { "b.", DNS_DB_NSEC_NORMAL, ISC_R_SUCCESS, 1, { "b." } }, - { "b.", DNS_DB_NSEC_NSEC, ISC_R_SUCCESS, 1, { "b." } }, - { "b.", DNS_DB_NSEC_NSEC3, ISC_R_SUCCESS, 1, { "b." } }, + { "b.", DNS_DBNAMESPACE_NORMAL, ISC_R_SUCCESS, 1, { "b." } }, + { "b.", DNS_DBNAMESPACE_NSEC, ISC_R_SUCCESS, 1, { "b." } }, + { "b.", DNS_DBNAMESPACE_NSEC3, ISC_R_SUCCESS, 1, { "b." } }, { "b.a.", - DNS_DB_NSEC_NORMAL, + DNS_DBNAMESPACE_NORMAL, ISC_R_SUCCESS, 2, { "a.", "b.a." } }, - { "b.a.", DNS_DB_NSEC_NSEC, ISC_R_SUCCESS, 1, { "b.a." } }, - { "b.a.", DNS_DB_NSEC_NSEC3, ISC_R_NOTFOUND, 0, { NULL } }, + { "b.a.", DNS_DBNAMESPACE_NSEC, ISC_R_SUCCESS, 1, { "b.a." } }, + { "b.a.", DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 0, { NULL } }, { "c.b.a.", - DNS_DB_NSEC_NORMAL, + DNS_DBNAMESPACE_NORMAL, ISC_R_SUCCESS, 3, { "a.", "b.a.", "c.b.a." } }, { "c.b.a.", - DNS_DB_NSEC_NSEC, + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 1, { "b.a." } }, - { "c.b.a.", DNS_DB_NSEC_NSEC3, ISC_R_NOTFOUND, 0, { NULL } }, + { "c.b.a.", DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 0, { NULL } }, - { "c.", DNS_DB_NSEC_NORMAL, ISC_R_NOTFOUND, 0, { NULL } }, - { "c.", DNS_DB_NSEC_NSEC, ISC_R_NOTFOUND, 0, { NULL } }, - { "c.", DNS_DB_NSEC_NSEC3, ISC_R_NOTFOUND, 0, { NULL } }, + { "c.", DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 0, { NULL } }, + { "c.", DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 0, { NULL } }, + { "c.", DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 0, { NULL } }, { "e.d.c.b.a.", - DNS_DB_NSEC_NORMAL, + DNS_DBNAMESPACE_NORMAL, ISC_R_SUCCESS, 4, { "a.", "b.a.", "c.b.a.", "e.d.c.b.a." } }, { "e.d.c.b.a.", - DNS_DB_NSEC_NSEC, + DNS_DBNAMESPACE_NSEC, ISC_R_SUCCESS, 2, { "b.a.", "e.d.c.b.a." } }, - { "e.d.c.b.a.", DNS_DB_NSEC_NSEC3, ISC_R_NOTFOUND, 0, { NULL } }, + { "e.d.c.b.a.", + DNS_DBNAMESPACE_NSEC3, + ISC_R_NOTFOUND, + 0, + { NULL } }, { "a.b.c.d.", - DNS_DB_NSEC_NORMAL, + DNS_DBNAMESPACE_NORMAL, ISC_R_SUCCESS, 1, { "a.b.c.d." } }, - { "a.b.c.d.", DNS_DB_NSEC_NSEC, ISC_R_NOTFOUND, 0, { NULL } }, { "a.b.c.d.", - DNS_DB_NSEC_NSEC3, + DNS_DBNAMESPACE_NSEC, + ISC_R_NOTFOUND, + 0, + { NULL } }, + { "a.b.c.d.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 1, { "c.d." } }, { "b.c.d.", - DNS_DB_NSEC_NORMAL, + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 0, { NULL } }, /* a.b.c.d. */ - { "b.c.d.", DNS_DB_NSEC_NSEC, ISC_R_NOTFOUND, 0, { NULL } }, + { "b.c.d.", DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 0, { NULL } }, { "b.c.d.", - DNS_DB_NSEC_NSEC3, + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 1, { "c.d." } }, - { "f.b.b.d.", DNS_DB_NSEC_NORMAL, ISC_R_NOTFOUND, 0, { NULL } }, - { "f.b.b.d.", DNS_DB_NSEC_NSEC, ISC_R_NOTFOUND, 0, { NULL } }, - { "f.b.b.d.", DNS_DB_NSEC_NSEC3, ISC_R_NOTFOUND, 0, { NULL } }, + { "f.b.b.d.", + DNS_DBNAMESPACE_NORMAL, + ISC_R_NOTFOUND, + 0, + { NULL } }, + { "f.b.b.d.", + DNS_DBNAMESPACE_NSEC, + ISC_R_NOTFOUND, + 0, + { NULL } }, + { "f.b.b.d.", + DNS_DBNAMESPACE_NSEC3, + ISC_R_NOTFOUND, + 0, + { NULL } }, { NULL, 0, 0, 0, { NULL } }, }; check_qpchain(qp, chain1); static struct check_predecessors pred1[] = { - { ".", DNS_DB_NSEC_NORMAL, "c.d.", DNS_DB_NSEC_NSEC3, + { ".", DNS_DBNAMESPACE_NORMAL, "c.d.", DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 0 }, - { ".", DNS_DB_NSEC_NSEC, "a.b.c.d.e.", DNS_DB_NSEC_NORMAL, - ISC_R_NOTFOUND, 6 }, - { ".", DNS_DB_NSEC_NSEC3, "b.", DNS_DB_NSEC_NSEC, + { ".", DNS_DBNAMESPACE_NSEC, "a.b.c.d.e.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 6 }, + { ".", DNS_DBNAMESPACE_NSEC3, "b.", DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 3 }, - { "a.", DNS_DB_NSEC_NORMAL, "c.d.", DNS_DB_NSEC_NSEC3, + { "a.", DNS_DBNAMESPACE_NORMAL, "c.d.", DNS_DBNAMESPACE_NSEC3, ISC_R_SUCCESS, 0 }, - { "a.", DNS_DB_NSEC_NSEC, "a.b.c.d.e.", DNS_DB_NSEC_NORMAL, - ISC_R_NOTFOUND, 6 }, - { "a.", DNS_DB_NSEC_NSEC3, "b.", DNS_DB_NSEC_NSEC, + { "a.", DNS_DBNAMESPACE_NSEC, "a.b.c.d.e.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 6 }, + { "a.", DNS_DBNAMESPACE_NSEC3, "b.", DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 3 }, - { "b.", DNS_DB_NSEC_NORMAL, "e.d.c.b.a.", DNS_DB_NSEC_NORMAL, - ISC_R_SUCCESS, 9 }, - { "b.", DNS_DB_NSEC_NSEC, "e.d.c.b.a.", DNS_DB_NSEC_NSEC, - ISC_R_SUCCESS, 4 }, - { "b.", DNS_DB_NSEC_NSEC3, "b.", DNS_DB_NSEC_NSEC, + { "b.", DNS_DBNAMESPACE_NORMAL, "e.d.c.b.a.", + DNS_DBNAMESPACE_NORMAL, ISC_R_SUCCESS, 9 }, + { "b.", DNS_DBNAMESPACE_NSEC, "e.d.c.b.a.", + DNS_DBNAMESPACE_NSEC, ISC_R_SUCCESS, 4 }, + { "b.", DNS_DBNAMESPACE_NSEC3, "b.", DNS_DBNAMESPACE_NSEC, ISC_R_SUCCESS, 3 }, - { "b.a.", DNS_DB_NSEC_NORMAL, "a.", DNS_DB_NSEC_NORMAL, + { "b.a.", DNS_DBNAMESPACE_NORMAL, "a.", DNS_DBNAMESPACE_NORMAL, ISC_R_SUCCESS, 12 }, - { "b.a.", DNS_DB_NSEC_NSEC, "a.b.c.d.e.", DNS_DB_NSEC_NORMAL, - ISC_R_SUCCESS, 6 }, - { "b.a.", DNS_DB_NSEC_NSEC3, "b.", DNS_DB_NSEC_NSEC, + { "b.a.", DNS_DBNAMESPACE_NSEC, "a.b.c.d.e.", + DNS_DBNAMESPACE_NORMAL, ISC_R_SUCCESS, 6 }, + { "b.a.", DNS_DBNAMESPACE_NSEC3, "b.", DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 3 }, - { "c.b.a.", DNS_DB_NSEC_NORMAL, "b.a.", DNS_DB_NSEC_NORMAL, - ISC_R_SUCCESS, 11 }, - { "c.b.a.", DNS_DB_NSEC_NSEC, "b.a.", DNS_DB_NSEC_NSEC, + { "c.b.a.", DNS_DBNAMESPACE_NORMAL, "b.a.", + DNS_DBNAMESPACE_NORMAL, ISC_R_SUCCESS, 11 }, + { "c.b.a.", DNS_DBNAMESPACE_NSEC, "b.a.", DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 5 }, - { "c.b.a.", DNS_DB_NSEC_NSEC3, "b.", DNS_DB_NSEC_NSEC, + { "c.b.a.", DNS_DBNAMESPACE_NSEC3, "b.", DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 3 }, - { "c.", DNS_DB_NSEC_NORMAL, "b.", DNS_DB_NSEC_NORMAL, + { "c.", DNS_DBNAMESPACE_NORMAL, "b.", DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 8 }, - { "c.", DNS_DB_NSEC_NSEC, "b.", DNS_DB_NSEC_NSEC, + { "c.", DNS_DBNAMESPACE_NSEC, "b.", DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 3 }, - { "c.", DNS_DB_NSEC_NSEC3, "c.b.b.", DNS_DB_NSEC_NSEC3, + { "c.", DNS_DBNAMESPACE_NSEC3, "c.b.b.", DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 1 }, - { "e.d.c.b.a.", DNS_DB_NSEC_NORMAL, "c.b.a.", - DNS_DB_NSEC_NORMAL, ISC_R_SUCCESS, 10 }, - { "e.d.c.b.a.", DNS_DB_NSEC_NSEC, "b.a.", DNS_DB_NSEC_NSEC, - ISC_R_SUCCESS, 5 }, - { "e.d.c.b.a.", DNS_DB_NSEC_NSEC3, "b.", DNS_DB_NSEC_NSEC, - ISC_R_NOTFOUND, 3 }, + { "e.d.c.b.a.", DNS_DBNAMESPACE_NORMAL, "c.b.a.", + DNS_DBNAMESPACE_NORMAL, ISC_R_SUCCESS, 10 }, + { "e.d.c.b.a.", DNS_DBNAMESPACE_NSEC, "b.a.", + DNS_DBNAMESPACE_NSEC, ISC_R_SUCCESS, 5 }, + { "e.d.c.b.a.", DNS_DBNAMESPACE_NSEC3, "b.", + DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 3 }, - { "a.b.c.d.", DNS_DB_NSEC_NORMAL, "b.", DNS_DB_NSEC_NORMAL, - ISC_R_SUCCESS, 8 }, - { "a.b.c.d.", DNS_DB_NSEC_NSEC, "b.", DNS_DB_NSEC_NSEC, + { "a.b.c.d.", DNS_DBNAMESPACE_NORMAL, "b.", + DNS_DBNAMESPACE_NORMAL, ISC_R_SUCCESS, 8 }, + { "a.b.c.d.", DNS_DBNAMESPACE_NSEC, "b.", DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 3 }, - { "a.b.c.d.", DNS_DB_NSEC_NSEC3, "c.d.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 0 }, + { "a.b.c.d.", DNS_DBNAMESPACE_NSEC3, "c.d.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 0 }, - { "b.c.d.", DNS_DB_NSEC_NORMAL, "b.", DNS_DB_NSEC_NORMAL, - ISC_R_NOTFOUND, 8 }, - { "b.c.d.", DNS_DB_NSEC_NSEC, "b.", DNS_DB_NSEC_NSEC, + { "b.c.d.", DNS_DBNAMESPACE_NORMAL, "b.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 8 }, + { "b.c.d.", DNS_DBNAMESPACE_NSEC, "b.", DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 3 }, - { "b.c.d.", DNS_DB_NSEC_NSEC3, "c.d.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 0 }, + { "b.c.d.", DNS_DBNAMESPACE_NSEC3, "c.d.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 0 }, - { "f.b.b.d.", DNS_DB_NSEC_NORMAL, "b.", DNS_DB_NSEC_NORMAL, - ISC_R_NOTFOUND, 8 }, - { "f.b.b.d.", DNS_DB_NSEC_NSEC, "b.", DNS_DB_NSEC_NSEC, + { "f.b.b.d.", DNS_DBNAMESPACE_NORMAL, "b.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 8 }, + { "f.b.b.d.", DNS_DBNAMESPACE_NSEC, "b.", DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 3 }, - { "f.b.b.d.", DNS_DB_NSEC_NSEC3, "c.b.b.", DNS_DB_NSEC_NSEC3, - ISC_R_NOTFOUND, 1 }, + { "f.b.b.d.", DNS_DBNAMESPACE_NSEC3, "c.b.b.", + DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 1 }, { NULL, 0, NULL, 0, 0, 0 }, }; @@ -1843,90 +1873,106 @@ ISC_RUN_TEST_IMPL(qpkey_delete) { /* delete checks */ static struct check_delete del1[] = { - { ".", DNS_DB_NSEC_NORMAL, ISC_R_NOTFOUND }, - { "a.", DNS_DB_NSEC_NSEC, ISC_R_NOTFOUND }, - { "a.", DNS_DB_NSEC_NORMAL, ISC_R_SUCCESS }, - { "b.", DNS_DB_NSEC_NORMAL, ISC_R_SUCCESS }, - { "b.", DNS_DB_NSEC_NSEC, ISC_R_SUCCESS }, - { "b.", DNS_DB_NSEC_NSEC3, ISC_R_SUCCESS }, - { "b.a.", DNS_DB_NSEC_NSEC3, ISC_R_NOTFOUND }, - { "b.a.", DNS_DB_NSEC_NORMAL, ISC_R_SUCCESS }, - { "e.d.c.b.a.", DNS_DB_NSEC_NORMAL, ISC_R_SUCCESS }, + { ".", DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND }, + { "a.", DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND }, + { "a.", DNS_DBNAMESPACE_NORMAL, ISC_R_SUCCESS }, + { "b.", DNS_DBNAMESPACE_NORMAL, ISC_R_SUCCESS }, + { "b.", DNS_DBNAMESPACE_NSEC, ISC_R_SUCCESS }, + { "b.", DNS_DBNAMESPACE_NSEC3, ISC_R_SUCCESS }, + { "b.a.", DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND }, + { "b.a.", DNS_DBNAMESPACE_NORMAL, ISC_R_SUCCESS }, + { "e.d.c.b.a.", DNS_DBNAMESPACE_NORMAL, ISC_R_SUCCESS }, { NULL, 0, 0 }, }; check_delete(qp, del1); /* again */ static struct check_delete del2[] = { - { ".", DNS_DB_NSEC_NORMAL, ISC_R_NOTFOUND }, - { "a.", DNS_DB_NSEC_NSEC, ISC_R_NOTFOUND }, - { "a.", DNS_DB_NSEC_NORMAL, ISC_R_NOTFOUND }, - { "b.", DNS_DB_NSEC_NORMAL, ISC_R_NOTFOUND }, - { "b.", DNS_DB_NSEC_NSEC, ISC_R_NOTFOUND }, - { "b.", DNS_DB_NSEC_NSEC3, ISC_R_NOTFOUND }, - { "b.a.", DNS_DB_NSEC_NSEC3, ISC_R_NOTFOUND }, - { "b.a.", DNS_DB_NSEC_NORMAL, ISC_R_NOTFOUND }, - { "e.d.c.b.a.", DNS_DB_NSEC_NORMAL, ISC_R_NOTFOUND }, + { ".", DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND }, + { "a.", DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND }, + { "a.", DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND }, + { "b.", DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND }, + { "b.", DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND }, + { "b.", DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND }, + { "b.a.", DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND }, + { "b.a.", DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND }, + { "e.d.c.b.a.", DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND }, { NULL, 0, 0 }, }; check_delete(qp, del2); /* lookup checks after deleting */ static struct check_qpchain chain2[] = { - { ".", DNS_DB_NSEC_NORMAL, ISC_R_NOTFOUND, 0, { NULL } }, - { ".", DNS_DB_NSEC_NSEC, ISC_R_NOTFOUND, 0, { NULL } }, - { ".", DNS_DB_NSEC_NSEC3, ISC_R_NOTFOUND, 0, { NULL } }, + { ".", DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 0, { NULL } }, + { ".", DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 0, { NULL } }, + { ".", DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 0, { NULL } }, { "a.", - DNS_DB_NSEC_NORMAL, + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 0, { NULL } }, /* c.b.a. */ - { "a.", DNS_DB_NSEC_NSEC, ISC_R_NOTFOUND, 0, { NULL } }, /* b.a. - */ - { "a.", DNS_DB_NSEC_NSEC3, ISC_R_NOTFOUND, 0, { NULL } }, + { "a.", + DNS_DBNAMESPACE_NSEC, + ISC_R_NOTFOUND, + 0, + { NULL } }, /* b.a. + */ + { "a.", DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 0, { NULL } }, - { "b.", DNS_DB_NSEC_NORMAL, ISC_R_NOTFOUND, 0, { NULL } }, - { "b.", DNS_DB_NSEC_NSEC, ISC_R_NOTFOUND, 0, { NULL } }, - { "b.", DNS_DB_NSEC_NSEC3, ISC_R_NOTFOUND, 0, { NULL } }, + { "b.", DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 0, { NULL } }, + { "b.", DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 0, { NULL } }, + { "b.", DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 0, { NULL } }, { "b.a.", - DNS_DB_NSEC_NORMAL, + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 0, { NULL } }, /* c.b.a. */ - { "b.a.", DNS_DB_NSEC_NSEC, ISC_R_SUCCESS, 1, { "b.a." } }, - { "b.a.", DNS_DB_NSEC_NSEC3, ISC_R_NOTFOUND, 0, { NULL } }, + { "b.a.", DNS_DBNAMESPACE_NSEC, ISC_R_SUCCESS, 1, { "b.a." } }, + { "b.a.", DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 0, { NULL } }, - { "c.b.a.", DNS_DB_NSEC_NORMAL, ISC_R_SUCCESS, 1, { "c.b.a." } }, { "c.b.a.", - DNS_DB_NSEC_NSEC, + DNS_DBNAMESPACE_NORMAL, + ISC_R_SUCCESS, + 1, + { "c.b.a." } }, + { "c.b.a.", + DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 1, { "b.a." } }, - { "c.b.a.", DNS_DB_NSEC_NSEC3, ISC_R_NOTFOUND, 0, { NULL } }, + { "c.b.a.", DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 0, { NULL } }, { "e.d.c.b.a.", - DNS_DB_NSEC_NORMAL, + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 1, { "c.b.a." } }, { "e.d.c.b.a.", - DNS_DB_NSEC_NSEC, + DNS_DBNAMESPACE_NSEC, ISC_R_SUCCESS, 2, { "b.a.", "e.d.c.b.a." } }, - { "e.d.c.b.a.", DNS_DB_NSEC_NSEC3, ISC_R_NOTFOUND, 0, { NULL } }, + { "e.d.c.b.a.", + DNS_DBNAMESPACE_NSEC3, + ISC_R_NOTFOUND, + 0, + { NULL } }, { "a.b.c.d.", - DNS_DB_NSEC_NORMAL, + DNS_DBNAMESPACE_NORMAL, ISC_R_SUCCESS, 1, { "a.b.c.d." } }, - { "a.b.c.d.", DNS_DB_NSEC_NSEC, ISC_R_NOTFOUND, 0, { NULL } }, { "a.b.c.d.", - DNS_DB_NSEC_NSEC3, + DNS_DBNAMESPACE_NSEC, + ISC_R_NOTFOUND, + 0, + { NULL } }, + { "a.b.c.d.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 1, { "c.d." } }, @@ -1936,75 +1982,75 @@ ISC_RUN_TEST_IMPL(qpkey_delete) { check_qpchain(qp, chain2); static struct check_predecessors pred2[] = { - { ".", DNS_DB_NSEC_NORMAL, "c.d.", DNS_DB_NSEC_NSEC3, + { ".", DNS_DBNAMESPACE_NORMAL, "c.d.", DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 0 }, - { ".", DNS_DB_NSEC_NSEC, "a.b.c.d.e.", DNS_DB_NSEC_NORMAL, - ISC_R_NOTFOUND, 4 }, - { ".", DNS_DB_NSEC_NSEC3, "e.d.c.b.a.", DNS_DB_NSEC_NSEC, - ISC_R_NOTFOUND, 2 }, + { ".", DNS_DBNAMESPACE_NSEC, "a.b.c.d.e.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 4 }, + { ".", DNS_DBNAMESPACE_NSEC3, "e.d.c.b.a.", + DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 2 }, - { "a.", DNS_DB_NSEC_NORMAL, "c.d.", DNS_DB_NSEC_NSEC3, + { "a.", DNS_DBNAMESPACE_NORMAL, "c.d.", DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 0 }, - { "a.", DNS_DB_NSEC_NSEC, "a.b.c.d.e.", DNS_DB_NSEC_NORMAL, - ISC_R_NOTFOUND, 4 }, - { "a.", DNS_DB_NSEC_NSEC3, "e.d.c.b.a.", DNS_DB_NSEC_NSEC, - ISC_R_NOTFOUND, 2 }, + { "a.", DNS_DBNAMESPACE_NSEC, "a.b.c.d.e.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 4 }, + { "a.", DNS_DBNAMESPACE_NSEC3, "e.d.c.b.a.", + DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 2 }, - { "b.", DNS_DB_NSEC_NORMAL, "c.b.a.", DNS_DB_NSEC_NORMAL, - ISC_R_NOTFOUND, 6 }, - { "b.", DNS_DB_NSEC_NSEC, "e.d.c.b.a.", DNS_DB_NSEC_NSEC, - ISC_R_NOTFOUND, 2 }, - { "b.", DNS_DB_NSEC_NSEC3, "e.d.c.b.a.", DNS_DB_NSEC_NSEC, - ISC_R_NOTFOUND, 2 }, /* c.b.b. */ + { "b.", DNS_DBNAMESPACE_NORMAL, "c.b.a.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 6 }, + { "b.", DNS_DBNAMESPACE_NSEC, "e.d.c.b.a.", + DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 2 }, + { "b.", DNS_DBNAMESPACE_NSEC3, "e.d.c.b.a.", + DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 2 }, /* c.b.b. */ - { "b.a.", DNS_DB_NSEC_NORMAL, "c.d.", DNS_DB_NSEC_NSEC3, + { "b.a.", DNS_DBNAMESPACE_NORMAL, "c.d.", DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 0 }, /* c.b.a. */ - { "b.a.", DNS_DB_NSEC_NSEC, "a.b.c.d.e.", DNS_DB_NSEC_NORMAL, - ISC_R_SUCCESS, 4 }, - { "b.a.", DNS_DB_NSEC_NSEC3, "e.d.c.b.a.", DNS_DB_NSEC_NSEC, - ISC_R_NOTFOUND, 2 }, + { "b.a.", DNS_DBNAMESPACE_NSEC, "a.b.c.d.e.", + DNS_DBNAMESPACE_NORMAL, ISC_R_SUCCESS, 4 }, + { "b.a.", DNS_DBNAMESPACE_NSEC3, "e.d.c.b.a.", + DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 2 }, - { "c.b.a.", DNS_DB_NSEC_NORMAL, "c.d.", DNS_DB_NSEC_NSEC3, - ISC_R_SUCCESS, 0 }, - { "c.b.a.", DNS_DB_NSEC_NSEC, "b.a.", DNS_DB_NSEC_NSEC, + { "c.b.a.", DNS_DBNAMESPACE_NORMAL, "c.d.", + DNS_DBNAMESPACE_NSEC3, ISC_R_SUCCESS, 0 }, + { "c.b.a.", DNS_DBNAMESPACE_NSEC, "b.a.", DNS_DBNAMESPACE_NSEC, DNS_R_PARTIALMATCH, 3 }, - { "c.b.a.", DNS_DB_NSEC_NSEC3, "e.d.c.b.a.", DNS_DB_NSEC_NSEC, - ISC_R_NOTFOUND, 2 }, + { "c.b.a.", DNS_DBNAMESPACE_NSEC3, "e.d.c.b.a.", + DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 2 }, - { "c.", DNS_DB_NSEC_NORMAL, "c.b.a.", DNS_DB_NSEC_NORMAL, - ISC_R_NOTFOUND, 6 }, - { "c.", DNS_DB_NSEC_NSEC, "e.d.c.b.a.", DNS_DB_NSEC_NSEC, - ISC_R_NOTFOUND, 2 }, - { "c.", DNS_DB_NSEC_NSEC3, "c.b.b.", DNS_DB_NSEC_NSEC3, + { "c.", DNS_DBNAMESPACE_NORMAL, "c.b.a.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 6 }, + { "c.", DNS_DBNAMESPACE_NSEC, "e.d.c.b.a.", + DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 2 }, + { "c.", DNS_DBNAMESPACE_NSEC3, "c.b.b.", DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 1 }, - { "e.d.c.b.a.", DNS_DB_NSEC_NORMAL, "c.b.a.", - DNS_DB_NSEC_NORMAL, DNS_R_PARTIALMATCH, 6 }, - { "e.d.c.b.a.", DNS_DB_NSEC_NSEC, "b.a.", DNS_DB_NSEC_NSEC, - ISC_R_SUCCESS, 3 }, - { "e.d.c.b.a.", DNS_DB_NSEC_NSEC3, "e.d.c.b.a.", - DNS_DB_NSEC_NSEC, ISC_R_NOTFOUND, 2 }, + { "e.d.c.b.a.", DNS_DBNAMESPACE_NORMAL, "c.b.a.", + DNS_DBNAMESPACE_NORMAL, DNS_R_PARTIALMATCH, 6 }, + { "e.d.c.b.a.", DNS_DBNAMESPACE_NSEC, "b.a.", + DNS_DBNAMESPACE_NSEC, ISC_R_SUCCESS, 3 }, + { "e.d.c.b.a.", DNS_DBNAMESPACE_NSEC3, "e.d.c.b.a.", + DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 2 }, - { "a.b.c.d.", DNS_DB_NSEC_NORMAL, "c.b.a.", DNS_DB_NSEC_NORMAL, - ISC_R_SUCCESS, 6 }, - { "a.b.c.d.", DNS_DB_NSEC_NSEC, "e.d.c.b.a.", DNS_DB_NSEC_NSEC, - ISC_R_NOTFOUND, 2 }, - { "a.b.c.d.", DNS_DB_NSEC_NSEC3, "c.d.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 0 }, + { "a.b.c.d.", DNS_DBNAMESPACE_NORMAL, "c.b.a.", + DNS_DBNAMESPACE_NORMAL, ISC_R_SUCCESS, 6 }, + { "a.b.c.d.", DNS_DBNAMESPACE_NSEC, "e.d.c.b.a.", + DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 2 }, + { "a.b.c.d.", DNS_DBNAMESPACE_NSEC3, "c.d.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 0 }, - { "b.c.d.", DNS_DB_NSEC_NORMAL, "c.b.a.", DNS_DB_NSEC_NORMAL, - ISC_R_NOTFOUND, 6 }, - { "b.c.d.", DNS_DB_NSEC_NSEC, "e.d.c.b.a.", DNS_DB_NSEC_NSEC, - ISC_R_NOTFOUND, 2 }, - { "b.c.d.", DNS_DB_NSEC_NSEC3, "c.d.", DNS_DB_NSEC_NSEC3, - DNS_R_PARTIALMATCH, 0 }, + { "b.c.d.", DNS_DBNAMESPACE_NORMAL, "c.b.a.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 6 }, + { "b.c.d.", DNS_DBNAMESPACE_NSEC, "e.d.c.b.a.", + DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 2 }, + { "b.c.d.", DNS_DBNAMESPACE_NSEC3, "c.d.", + DNS_DBNAMESPACE_NSEC3, DNS_R_PARTIALMATCH, 0 }, - { "f.b.b.d.", DNS_DB_NSEC_NORMAL, "c.b.a.", DNS_DB_NSEC_NORMAL, - ISC_R_NOTFOUND, 6 }, - { "f.b.b.d.", DNS_DB_NSEC_NSEC, "e.d.c.b.a.", DNS_DB_NSEC_NSEC, - ISC_R_NOTFOUND, 2 }, - { "f.b.b.d.", DNS_DB_NSEC_NSEC3, "c.b.b.", DNS_DB_NSEC_NSEC3, - ISC_R_NOTFOUND, 1 }, + { "f.b.b.d.", DNS_DBNAMESPACE_NORMAL, "c.b.a.", + DNS_DBNAMESPACE_NORMAL, ISC_R_NOTFOUND, 6 }, + { "f.b.b.d.", DNS_DBNAMESPACE_NSEC, "e.d.c.b.a.", + DNS_DBNAMESPACE_NSEC, ISC_R_NOTFOUND, 2 }, + { "f.b.b.d.", DNS_DBNAMESPACE_NSEC3, "c.b.b.", + DNS_DBNAMESPACE_NSEC3, ISC_R_NOTFOUND, 1 }, { NULL, 0, NULL, 0, 0, 0 }, }; diff --git a/tests/libtest/qp.c b/tests/libtest/qp.c index ee3369a30c..4a6a9ff943 100644 --- a/tests/libtest/qp.c +++ b/tests/libtest/qp.c @@ -349,8 +349,9 @@ qp_test_printkey(const dns_qpkey_t key, size_t keylen) { dns_qpkey_toname(key, keylen, n, &s); dns_name_format(n, txt, sizeof(txt)); printf("%s%s%s\n", txt, - s == DNS_DB_NSEC_NSEC3 ? "NSEC3:" - : (s == DNS_DB_NSEC_NSEC ? "NSEC" : ""), + s == DNS_DBNAMESPACE_NSEC3 + ? "NSEC3:" + : (s == DNS_DBNAMESPACE_NSEC ? "NSEC" : ""), dns_name_isabsolute(n) ? "." : ""); }