mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 13:38:26 +00:00
don't disturb search->chain when calling find_coveringnsec
This commit is contained in:
parent
5bbf111a03
commit
e01d88e885
@ -4920,6 +4920,9 @@ find_coveringnsec(rbtdb_search_t *search, dns_dbnode_t **nodep,
|
|||||||
rbtdb_rdatatype_t matchtype, sigmatchtype;
|
rbtdb_rdatatype_t matchtype, sigmatchtype;
|
||||||
nodelock_t *lock;
|
nodelock_t *lock;
|
||||||
isc_rwlocktype_t locktype;
|
isc_rwlocktype_t locktype;
|
||||||
|
dns_rbtnodechain_t chain;
|
||||||
|
|
||||||
|
chain = search->chain;
|
||||||
|
|
||||||
matchtype = RBTDB_RDATATYPE_VALUE(dns_rdatatype_nsec, 0);
|
matchtype = RBTDB_RDATATYPE_VALUE(dns_rdatatype_nsec, 0);
|
||||||
sigmatchtype = RBTDB_RDATATYPE_VALUE(dns_rdatatype_rrsig,
|
sigmatchtype = RBTDB_RDATATYPE_VALUE(dns_rdatatype_rrsig,
|
||||||
@ -4931,8 +4934,7 @@ find_coveringnsec(rbtdb_search_t *search, dns_dbnode_t **nodep,
|
|||||||
name = dns_fixedname_name(&fname);
|
name = dns_fixedname_name(&fname);
|
||||||
dns_fixedname_init(&forigin);
|
dns_fixedname_init(&forigin);
|
||||||
origin = dns_fixedname_name(&forigin);
|
origin = dns_fixedname_name(&forigin);
|
||||||
result = dns_rbtnodechain_current(&search->chain, name,
|
result = dns_rbtnodechain_current(&chain, name, origin, &node);
|
||||||
origin, &node);
|
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
return (result);
|
return (result);
|
||||||
locktype = isc_rwlocktype_read;
|
locktype = isc_rwlocktype_read;
|
||||||
@ -4986,8 +4988,7 @@ find_coveringnsec(rbtdb_search_t *search, dns_dbnode_t **nodep,
|
|||||||
} else if (!empty_node) {
|
} else if (!empty_node) {
|
||||||
result = ISC_R_NOTFOUND;
|
result = ISC_R_NOTFOUND;
|
||||||
} else
|
} else
|
||||||
result = dns_rbtnodechain_prev(&search->chain, NULL,
|
result = dns_rbtnodechain_prev(&chain, NULL, NULL);
|
||||||
NULL);
|
|
||||||
unlock_node:
|
unlock_node:
|
||||||
NODE_UNLOCK(lock, locktype);
|
NODE_UNLOCK(lock, locktype);
|
||||||
} while (empty_node && result == ISC_R_SUCCESS);
|
} while (empty_node && result == ISC_R_SUCCESS);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user