From 8fcc82171af86457932979734854ffbed4649807 Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Mon, 26 Nov 2018 10:25:50 +0000 Subject: [PATCH] - Fix #4193: Fix that prefetch failure does not overwrite valid cache entry with SERVFAIL. git-svn-id: file:///svn/unbound/trunk@4976 be551aaa-1e26-0410-a405-d3ace91eadb9 --- doc/Changelog | 2 ++ iterator/iterator.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/Changelog b/doc/Changelog index 90a25be0b..a7f4af702 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,6 +1,8 @@ 26 November 2018: Wouter - Fix to not set GLOB_NOSORT so the unbound.conf include: files are sorted and in a predictable order. + - Fix #4193: Fix that prefetch failure does not overwrite valid cache + entry with SERVFAIL. 22 November 2018: Wouter - With ./configure --with-pyunbound --with-pythonmodule diff --git a/iterator/iterator.c b/iterator/iterator.c index e177dcf1f..ee970975a 100644 --- a/iterator/iterator.c +++ b/iterator/iterator.c @@ -292,7 +292,7 @@ error_response_cache(struct module_qstate* qstate, int id, int rcode) if(!qstate->no_cache_store) { /* store in cache */ struct reply_info err; - if(qstate->prefetch_leeway > NORR_TTL) { + if(qstate->prefetch_leeway > 0) { verbose(VERB_ALGO, "error response for prefetch in cache"); /* attempt to adjust the cache entry prefetch */ if(dns_cache_prefetch_adjust(qstate->env, &qstate->qinfo,