diff --git a/CHANGES b/CHANGES index f5deb72378..7c93df7dbf 100644 --- a/CHANGES +++ b/CHANGES @@ -59,6 +59,9 @@ not negotiate "dot" ALPN token could crash BIND on shutdown. That has been fixed. [GL #3767] +6057. [bug] Fix shutdown and error path bugs in the rpz unit. + [GL #3735] + 5850. [func] Run the RPZ update process on the offload threads. [GL #3190] diff --git a/lib/dns/rpz.c b/lib/dns/rpz.c index 4cacb4f8aa..dbdf6a05fc 100644 --- a/lib/dns/rpz.c +++ b/lib/dns/rpz.c @@ -1725,7 +1725,7 @@ update_nodes(dns_rpz_zone_t *rpz, isc_ht_t *newnodes) { DNS_LOGMODULE_MASTER, ISC_LOG_ERROR, "rpz: %s: failed to create DB iterator - %s", domain, isc_result_totext(result)); - goto cleanup; + return (result); } result = dns_dbiterator_first(updbit); @@ -1744,7 +1744,6 @@ update_nodes(dns_rpz_zone_t *rpz, isc_ht_t *newnodes) { result = dns__rpz_shuttingdown(rpz->rpzs); if (result != ISC_R_SUCCESS) { - dns_db_detachnode(rpz->updb, &node); goto cleanup; } @@ -1754,7 +1753,6 @@ update_nodes(dns_rpz_zone_t *rpz, isc_ht_t *newnodes) { DNS_LOGMODULE_MASTER, ISC_LOG_ERROR, "rpz: %s: failed to get dbiterator - %s", domain, isc_result_totext(result)); - dns_db_detachnode(rpz->updb, &node); goto cleanup; } @@ -1918,7 +1916,7 @@ update_rpz_cb(void *data) { result = dns__rpz_shuttingdown(rpz->rpzs); if (result != ISC_R_SUCCESS) { - goto cleanup; + goto shuttingdown; } isc_ht_init(&newnodes, rpz->rpzs->mctx, 1, ISC_HT_CASE_SENSITIVE); @@ -1939,6 +1937,7 @@ update_rpz_cb(void *data) { cleanup: isc_ht_destroy(&newnodes); +shuttingdown: rpz->updateresult = result; }