mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
4341. [bug] 'rndc flushtree' could fail to clean the tree if there
wasn't a node at the specified name. [RT #41846]
This commit is contained in:
@@ -1228,6 +1228,8 @@ cleartree(dns_db_t *db, dns_name_t *name) {
|
||||
goto cleanup;
|
||||
|
||||
result = dns_dbiterator_seek(iter, name);
|
||||
if (result == DNS_R_PARTIALMATCH)
|
||||
result = dns_dbiterator_next(iter);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
|
||||
@@ -1279,7 +1281,7 @@ dns_cache_flushnode(dns_cache_t *cache, dns_name_t *name,
|
||||
dns_dbnode_t *node = NULL;
|
||||
dns_db_t *db = NULL;
|
||||
|
||||
if (dns_name_equal(name, dns_rootname))
|
||||
if (tree && dns_name_equal(name, dns_rootname))
|
||||
return (dns_cache_flush(cache));
|
||||
|
||||
LOCK(&cache->lock);
|
||||
|
Reference in New Issue
Block a user