From 876da2a83da2b2fa74d765673da78a5fdc1b3c6d Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 16 Dec 2002 12:47:39 +0000 Subject: [PATCH] Check that the NS/AAAA/A RRsets have not expired seeing if they don't need to be replaced. --- lib/dns/rbtdb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c index 981c56a022..237a185c59 100644 --- a/lib/dns/rbtdb.c +++ b/lib/dns/rbtdb.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rbtdb.c,v 1.181 2002/11/12 23:24:45 explorer Exp $ */ +/* $Id: rbtdb.c,v 1.182 2002/12/16 12:47:39 marka Exp $ */ /* * Principal Author: Bob Halley @@ -3567,7 +3567,7 @@ add(dns_rbtdb_t *rbtdb, dns_rbtnode_t *rbtnode, rbtdb_version_t *rbtversion, * in the cache if they are already exist. This * prevents named being locked to old servers. */ - if (IS_CACHE(rbtdb) && + if (IS_CACHE(rbtdb) && header->ttl > now && header->type == dns_rdatatype_ns && !header_nx && !newheader_nx && header->trust == newheader->trust && @@ -3588,7 +3588,7 @@ add(dns_rbtdb_t *rbtdb, dns_rbtnode_t *rbtnode, rbtdb_version_t *rbtversion, addedrdataset); return (ISC_R_SUCCESS); } - if (IS_CACHE(rbtdb) && + if (IS_CACHE(rbtdb) && header->ttl > now && (header->type == dns_rdatatype_a || header->type == dns_rdatatype_aaaa) && !header_nx && !newheader_nx &&