2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

1799. [bug] 'rndc flushname' failed to flush negative cache

entries. [RT #13438]
This commit is contained in:
Mark Andrews
2005-03-15 02:48:58 +00:00
parent e9aca33f36
commit e90994e3f3
2 changed files with 6 additions and 22 deletions

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: cache.c,v 1.57 2004/03/05 05:09:18 marka Exp $ */
/* $Id: cache.c,v 1.58 2005/03/15 02:48:58 marka Exp $ */
#include <config.h>
@@ -1021,27 +1021,10 @@ dns_cache_flushname(dns_cache_t *cache, dns_name_t *name) {
dns_rdataset_init(&rdataset);
dns_rdatasetiter_current(iter, &rdataset);
for (result = dns_rdataset_first(&rdataset);
result == ISC_R_SUCCESS;
result = dns_rdataset_next(&rdataset))
{
dns_rdata_t rdata = DNS_RDATA_INIT;
dns_rdatatype_t covers;
dns_rdataset_current(&rdataset, &rdata);
if (rdata.type == dns_rdatatype_rrsig)
covers = dns_rdata_covers(&rdata);
else
covers = 0;
result = dns_db_deleterdataset(cache->db, node, NULL,
rdata.type, covers);
if (result != ISC_R_SUCCESS &&
result != DNS_R_UNCHANGED)
break;
}
result = dns_db_deleterdataset(cache->db, node, NULL,
rdataset.type, rdataset.covers);
dns_rdataset_disassociate(&rdataset);
if (result != ISC_R_NOMORE)
if (result != ISC_R_SUCCESS && result != DNS_R_UNCHANGED)
break;
}
if (result == ISC_R_NOMORE)