From: Ondřej Surý Date: Tue, 6 Feb 2024 13:05:08 +0000 (+0100) Subject: Fix missing RRSIG for CNAME with different slabheader order X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08ac45897b30349878b3459214bebed4fbcf5f8a;p=thirdparty%2Fbind9.git Fix missing RRSIG for CNAME with different slabheader order The cachedb was missing piece of code (already found in zonedb) that would make lookups in the slabheaders to miss the RRSIGs for CNAME if the order of CNAME and RRSIG(CNAME) was reversed in the node->data. (cherry picked from commit 5070c7f5c74a143f74775515d65fad01f398ecd1) --- diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c index ca315028b3b..bab35e4eaaa 100644 --- a/lib/dns/rbtdb.c +++ b/lib/dns/rbtdb.c @@ -5212,13 +5212,17 @@ cache_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version, */ found = header; if (header->type == dns_rdatatype_cname && - cname_ok && - cnamesig != NULL) { + cname_ok) { /* * If we've already got the * CNAME RRSIG, use it. */ - foundsig = cnamesig; + if (cnamesig != NULL) { + foundsig = cnamesig; + } else { + sigtype = + RBTDB_RDATATYPE_SIGCNAME; + } } } else if (header->type == sigtype) { /*