]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix #4193: Fix that prefetch failure does not overwrite valid cache
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 26 Nov 2018 10:25:50 +0000 (10:25 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 26 Nov 2018 10:25:50 +0000 (10:25 +0000)
  entry with SERVFAIL.

git-svn-id: file:///svn/unbound/trunk@4976 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
iterator/iterator.c

index 90a25be0b5d30267800ef1f108550f0da98241c9..a7f4af7021c48d7a9dd90e045ca81a3ee8475e8a 100644 (file)
@@ -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
index e177dcf1f68e1cc3cf7b86d6d47434cc7627f937..ee970975a956376d09f3bf299cc3830fc6d06780 100644 (file)
@@ -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,