2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-01 15:05:23 +00:00

cache_name() sometimes returned DNS_R_UNCHANGED instead of DNS_R_SUCCESS,

causing some queries to secure domains to return SERVFAIL
This commit is contained in:
Andreas Gustafsson
2000-04-20 17:56:03 +00:00
parent de7787e364
commit ad4e4fe2a3

View File

@@ -2356,16 +2356,18 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, isc_stdtime_t now) {
result = dns_db_addrdataset(res->view->cachedb, result = dns_db_addrdataset(res->view->cachedb,
node, NULL, now, node, NULL, now,
rdataset, 0, NULL); rdataset, 0, NULL);
if (result != ISC_R_SUCCESS && if (result == DNS_R_UNCHANGED)
result != DNS_R_UNCHANGED) result = ISC_R_SUCCESS;
if (result != ISC_R_SUCCESS)
break; break;
if (sigrdataset != NULL) { if (sigrdataset != NULL) {
result = dns_db_addrdataset(res->view->cachedb, result = dns_db_addrdataset(res->view->cachedb,
node, NULL, now, node, NULL, now,
sigrdataset, 0, sigrdataset, 0,
NULL); NULL);
if (result != ISC_R_SUCCESS && if (result == DNS_R_UNCHANGED)
result != DNS_R_UNCHANGED) result = ISC_R_SUCCESS;
if (result != ISC_R_SUCCESS)
break; break;
} }
if (ANSWER(rdataset)) { if (ANSWER(rdataset)) {