From: Wouter Wijngaards Date: Fri, 14 Jan 2011 15:23:51 +0000 (+0000) Subject: store if ttl expired X-Git-Tag: release-1.4.8rc1~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2dc8292583433af8d6b9f8756c093f258c2bb49;p=thirdparty%2Funbound.git store if ttl expired git-svn-id: file:///svn/unbound/trunk@2374 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/services/cache/rrset.c b/services/cache/rrset.c index c42a741ea..6677596a9 100644 --- a/services/cache/rrset.c +++ b/services/cache/rrset.c @@ -352,7 +352,8 @@ rrset_update_sec_status(struct rrset_cache* r, cachedata->security = updata->security; /* for NS records only shorter TTLs, other types: update it */ if(ntohs(rrset->rk.type) != LDNS_RR_TYPE_NS || - updata->ttl+now < cachedata->ttl) { + updata->ttl+now < cachedata->ttl || + cachedata->ttl < now) { cachedata->ttl = updata->ttl + now; for(i=0; icount+cachedata->rrsig_count; i++) cachedata->rr_ttl[i] = updata->rr_ttl[i]+now;