From: Matthijs Mekking Date: Thu, 3 Sep 2020 13:10:28 +0000 (+0200) Subject: Handle ancient rrsets in bind_rdataset X-Git-Tag: v9.17.6~35^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=388cc666e51b90d46c4bcd8cb70d14196c923292;p=thirdparty%2Fbind9.git Handle ancient rrsets in bind_rdataset An ancient RRset is one still in the cache but expired, and awaiting cleanup. --- diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c index 3218583c246..e23bab0b392 100644 --- a/lib/dns/rbtdb.c +++ b/lib/dns/rbtdb.c @@ -3144,7 +3144,12 @@ bind_rdataset(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node, rdatasetheader_t *header, rdataset->stale_ttl = (rbtdb->serve_stale_ttl + header->rdh_ttl) - now; rdataset->ttl = 0; + } else if (header->rdh_ttl < now) { + rdataset->attributes |= DNS_RDATASETATTR_ANCIENT; + rdataset->stale_ttl = 0; + rdataset->ttl = 0; } + rdataset->private1 = rbtdb; rdataset->private2 = node; raw = (unsigned char *)header + sizeof(*header);