return DNS_R_DNAME;
}
+ if (relation != dns_namereln_subdomain &&
+ dns_nsec_typepresent(&rdata, dns_rdatatype_soa))
+ {
+ /*
+ * An NSEC with an SOA in the bitmap can only cover
+ * names that are subdomains of the owner.
+ */
+ (*logit)(arg, ISC_LOG_DEBUG(3),
+ "ignoring nsec with SOA covering non-subdomain");
+ return ISC_R_IGNORE;
+ }
+
RETERR(dns_rdata_tostruct(&rdata, &nsec, NULL));
relation = dns_name_fullcompare(&nsec.next, name, &order, &nlabels);
if (order == 0) {
rdataset->trust == dns_trust_secure &&
(NEEDNODATA(val) || NEEDNOQNAME(val)) &&
!FOUNDNODATA(val) && !FOUNDNOQNAME(val) &&
+ dns_name_issubdomain(val->name,
+ &subvalidator->siginfo->signer) &&
dns_nsec_noexistnodata(val->type, val->name,
subvalidator->name, rdataset,
&exists, &data, wild, validator_log,
goto cleanup;
}
+ /*
+ * The query name can't be above the signer of the NSEC.
+ */
+ if (!dns_name_issubdomain(qctx->client->query.qname, signer)) {
+ goto cleanup;
+ }
+
/*
* If NSEC or RRSIG are missing from the type map
* reject the NSEC RRset.