]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
and store bogus ttl (this is not picked out of the cache to send to, so saves work...
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 14 Jan 2011 15:51:11 +0000 (15:51 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 14 Jan 2011 15:51:11 +0000 (15:51 +0000)
git-svn-id: file:///svn/unbound/trunk@2375 be551aaa-1e26-0410-a405-d3ace91eadb9

services/cache/rrset.c

index 6677596a99a3b11e3879d62b492e173121c31f2e..381d8193ecfb15a5fa1cca8534542fd84f8d20a9 100644 (file)
@@ -353,7 +353,8 @@ rrset_update_sec_status(struct rrset_cache* r,
                /* for NS records only shorter TTLs, other types: update it */
                if(ntohs(rrset->rk.type) != LDNS_RR_TYPE_NS ||
                        updata->ttl+now < cachedata->ttl ||
-                       cachedata->ttl < now) {
+                       cachedata->ttl < now ||
+                       updata->trust == sec_status_bogus) {
                        cachedata->ttl = updata->ttl + now;
                        for(i=0; i<cachedata->count+cachedata->rrsig_count; i++)
                                cachedata->rr_ttl[i] = updata->rr_ttl[i]+now;