Commit 61b53955 authored by Evan Hunt's avatar Evan Hunt

Merge branch 'each-nsec3-ixfr' into 'master'

don't bother checking for empty nodes when searching the NSEC3 tree

Closes #1834

See merge request !3512
parents fb3a4191 0f901b5f
Pipeline #41559 passed with stages
in 23 minutes and 22 seconds
5409. [performance] When looking up NSEC3 data in a zone database, skip
the check for empty non-terminal nodes; the NSEC3
tree doesn't have any. [GL #1834]
5408. [protocol] Print Extended DNS Errors if present in OPT record.
[GL #1835]
......
......@@ -3273,7 +3273,7 @@ activeempty(rbtdb_search_t *search, dns_rbtnodechain_t *chain,
}
static inline bool
activeemtpynode(rbtdb_search_t *search, const dns_name_t *qname,
activeemptynode(rbtdb_search_t *search, const dns_name_t *qname,
dns_name_t *wname) {
dns_fixedname_t fnext;
dns_fixedname_t forigin;
......@@ -3504,7 +3504,7 @@ find_wildcard(rbtdb_search_t *search, dns_rbtnode_t **nodep,
NODE_UNLOCK(lock, isc_rwlocktype_read);
if (header != NULL ||
activeempty(search, &wchain, wname)) {
if (activeemtpynode(search, qname,
if (activeemptynode(search, qname,
wname)) {
return (ISC_R_NOTFOUND);
}
......@@ -3908,7 +3908,6 @@ zone_find(dns_db_t *db, const dns_name_t *name, dns_dbversion_t *version,
rdatasetheader_t *foundsig, *cnamesig, *nsecsig;
rbtdb_rdatatype_t sigtype;
bool active;
dns_rbtnodechain_t chain;
nodelock_t *lock;
dns_rbt_t *tree;
......@@ -3986,8 +3985,15 @@ zone_find(dns_db_t *db, const dns_name_t *name, dns_dbversion_t *version,
}
}
chain = search.chain;
active = activeempty(&search, &chain, name);
active = false;
if ((options & DNS_DBFIND_FORCENSEC3) == 0) {
/*
* The NSEC3 tree won't have empty nodes,
* so it isn't necessary to check for them.
*/
dns_rbtnodechain_t chain = search.chain;
active = activeempty(&search, &chain, name);
}
/*
* If we're here, then the name does not exist, is not
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment