mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-03 16:15:27 +00:00
qpzone.c:step() could ignore rollbacks
the step() function (used for stepping to the prececessor or
successor of a database node) could overlook a node because
there was an rdataset marked IGNORE because it had been rolled
back, covering an active rdataset under it.
(cherry picked from commit 24eaff7adc
)
This commit is contained in:
@@ -2635,13 +2635,25 @@ step(qpz_search_t *search, dns_qpiter_t *it, direction_t direction,
|
|||||||
while (result == ISC_R_SUCCESS) {
|
while (result == ISC_R_SUCCESS) {
|
||||||
isc_rwlock_t *nlock = &qpdb->buckets[node->locknum].lock;
|
isc_rwlock_t *nlock = &qpdb->buckets[node->locknum].lock;
|
||||||
isc_rwlocktype_t nlocktype = isc_rwlocktype_none;
|
isc_rwlocktype_t nlocktype = isc_rwlocktype_none;
|
||||||
|
dns_slabheader_t *header_next = NULL;
|
||||||
|
|
||||||
NODE_RDLOCK(nlock, &nlocktype);
|
NODE_RDLOCK(nlock, &nlocktype);
|
||||||
for (header = node->data; header != NULL; header = header->next)
|
for (header = node->data; header != NULL; header = header_next)
|
||||||
{
|
{
|
||||||
if (header->serial <= search->serial &&
|
header_next = header->next;
|
||||||
!IGNORE(header) && !NONEXISTENT(header))
|
while (header != NULL) {
|
||||||
{
|
if (header->serial <= search->serial &&
|
||||||
|
!IGNORE(header))
|
||||||
|
{
|
||||||
|
if (NONEXISTENT(header)) {
|
||||||
|
header = NULL;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
} else {
|
||||||
|
header = header->down;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (header != NULL) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user