mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 13:38:26 +00:00
Add failure handling when iterators don't end with ISC_R_NOMORE
This commit is contained in:
parent
6012479419
commit
bff83b9480
@ -15501,6 +15501,7 @@ restore_nsec3param(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *version,
|
|||||||
static void
|
static void
|
||||||
receive_secure_db(isc_task_t *task, isc_event_t *event) {
|
receive_secure_db(isc_task_t *task, isc_event_t *event) {
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
|
isc_result_t iter_result;
|
||||||
dns_zone_t *zone;
|
dns_zone_t *zone;
|
||||||
dns_db_t *rawdb, *db = NULL;
|
dns_db_t *rawdb, *db = NULL;
|
||||||
dns_fixedname_t fname;
|
dns_fixedname_t fname;
|
||||||
@ -15577,6 +15578,7 @@ receive_secure_db(isc_task_t *task, isc_event_t *event) {
|
|||||||
{
|
{
|
||||||
dns_dbnode_t *rawnode = NULL, *node = NULL;
|
dns_dbnode_t *rawnode = NULL, *node = NULL;
|
||||||
dns_rdatasetiter_t *rdsit = NULL;
|
dns_rdatasetiter_t *rdsit = NULL;
|
||||||
|
isc_result_t rdsit_result;
|
||||||
|
|
||||||
result = dns_dbiterator_current(dbiterator, &rawnode, name);
|
result = dns_dbiterator_current(dbiterator, &rawnode, name);
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
@ -15593,7 +15595,7 @@ receive_secure_db(isc_task_t *task, isc_event_t *event) {
|
|||||||
goto iter_cleanup;
|
goto iter_cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (isc_result_t rdsit_result = dns_rdatasetiter_first(rdsit);
|
for (rdsit_result = dns_rdatasetiter_first(rdsit);
|
||||||
rdsit_result == ISC_R_SUCCESS;
|
rdsit_result == ISC_R_SUCCESS;
|
||||||
rdsit_result = dns_rdatasetiter_next(rdsit))
|
rdsit_result = dns_rdatasetiter_next(rdsit))
|
||||||
{
|
{
|
||||||
@ -15626,6 +15628,11 @@ receive_secure_db(isc_task_t *task, isc_event_t *event) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (rdsit_result != ISC_R_SUCCESS &&
|
||||||
|
rdsit_result != ISC_R_NOMORE)
|
||||||
|
{
|
||||||
|
result = rdsit_result;
|
||||||
|
}
|
||||||
dns_rdatasetiter_destroy(&rdsit);
|
dns_rdatasetiter_destroy(&rdsit);
|
||||||
iter_cleanup:
|
iter_cleanup:
|
||||||
if (rawnode) {
|
if (rawnode) {
|
||||||
@ -15638,6 +15645,10 @@ iter_cleanup:
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (iter_result != ISC_R_SUCCESS &&
|
||||||
|
iter_result != ISC_R_NOMORE) {
|
||||||
|
result = iter_result;
|
||||||
|
}
|
||||||
dns_dbiterator_destroy(&dbiterator);
|
dns_dbiterator_destroy(&dbiterator);
|
||||||
|
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user