From ad4e4fe2a304c889e603f922cc222b21e430ba57 Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Thu, 20 Apr 2000 17:56:03 +0000 Subject: [PATCH] cache_name() sometimes returned DNS_R_UNCHANGED instead of DNS_R_SUCCESS, causing some queries to secure domains to return SERVFAIL --- lib/dns/resolver.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index 2222e2bf4c..68b6e6f32d 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -2356,16 +2356,18 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, isc_stdtime_t now) { result = dns_db_addrdataset(res->view->cachedb, node, NULL, now, rdataset, 0, NULL); - if (result != ISC_R_SUCCESS && - result != DNS_R_UNCHANGED) + if (result == DNS_R_UNCHANGED) + result = ISC_R_SUCCESS; + if (result != ISC_R_SUCCESS) break; if (sigrdataset != NULL) { result = dns_db_addrdataset(res->view->cachedb, node, NULL, now, sigrdataset, 0, NULL); - if (result != ISC_R_SUCCESS && - result != DNS_R_UNCHANGED) + if (result == DNS_R_UNCHANGED) + result = ISC_R_SUCCESS; + if (result != ISC_R_SUCCESS) break; } if (ANSWER(rdataset)) {