From a0c1fa2a8f6710d8c490643c3d04014f907e1a23 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 7 Jun 2012 12:51:11 +1000 Subject: [PATCH] 3332. [bug] Re-use cached DS rrsets if possible. [RT 29446] --- CHANGES | 2 ++ lib/dns/rbtdb.c | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index fdac29a846..47a2198dfd 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +3332. [bug] Re-use cached DS rrsets if possible. [RT 29446] + 3331. [security] dns_rdataslab_fromrdataset could produce bad rdataslabs. [RT #29644] diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c index 222df68a1a..0eaff14e2d 100644 --- a/lib/dns/rbtdb.c +++ b/lib/dns/rbtdb.c @@ -113,6 +113,8 @@ typedef isc_uint32_t rbtdb_rdatatype_t; RBTDB_RDATATYPE_VALUE(dns_rdatatype_rrsig, dns_rdatatype_cname) #define RBTDB_RDATATYPE_SIGDNAME \ RBTDB_RDATATYPE_VALUE(dns_rdatatype_rrsig, dns_rdatatype_dname) +#define RBTDB_RDATATYPE_SIGDDS \ + RBTDB_RDATATYPE_VALUE(dns_rdatatype_rrsig, dns_rdatatype_ds) #define RBTDB_RDATATYPE_NCACHEANY \ RBTDB_RDATATYPE_VALUE(0, dns_rdatatype_any) @@ -6181,7 +6183,9 @@ add(dns_rbtdb_t *rbtdb, dns_rbtnode_t *rbtnode, rbtdb_version_t *rbtversion, } if (IS_CACHE(rbtdb) && header->rdh_ttl > now && (header->type == dns_rdatatype_a || - header->type == dns_rdatatype_aaaa) && + header->type == dns_rdatatype_aaaa || + header->type == dns_rdatatype_ds || + header->type == RBTDB_RDATATYPE_SIGDDS) && !header_nx && !newheader_nx && header->trust >= newheader->trust && dns_rdataslab_equal((unsigned char *)header,