|
@@ -171,23 +171,14 @@ void
|
|
Query::addNSEC3NXDOMAINProof(ZoneFinder& finder) {
|
|
Query::addNSEC3NXDOMAINProof(ZoneFinder& finder) {
|
|
// Firstly get the NSEC3 proves for Closest Encloser Proof
|
|
// Firstly get the NSEC3 proves for Closest Encloser Proof
|
|
// See section 7.2.1 of RFC 5155.
|
|
// See section 7.2.1 of RFC 5155.
|
|
|
|
+ // Since this is a Name Error case both closest and next proofs should
|
|
|
|
+ // be available (see addNXRRsetProof).
|
|
const ZoneFinder::FindNSEC3Result fresult1 = finder.findNSEC3(qname_,
|
|
const ZoneFinder::FindNSEC3Result fresult1 = finder.findNSEC3(qname_,
|
|
true);
|
|
true);
|
|
- if (!fresult1.closest_proof) {
|
|
|
|
- isc_throw(BadNSEC3, "NSEC3 RR for NXDOMAIN proving that matches the "
|
|
|
|
- "closest encloser is empty.");
|
|
|
|
- }
|
|
|
|
- // Add the NSEC3 proving that matches the closest (provable) encloser.
|
|
|
|
response_.addRRset(Message::SECTION_AUTHORITY,
|
|
response_.addRRset(Message::SECTION_AUTHORITY,
|
|
boost::const_pointer_cast<AbstractRRset>(
|
|
boost::const_pointer_cast<AbstractRRset>(
|
|
- fresult1.closest_proof),
|
|
|
|
|
|
+ fresult1.closest_proof),
|
|
dnssec_);
|
|
dnssec_);
|
|
- if (!fresult1.next_proof) {
|
|
|
|
- isc_throw(BadNSEC3, "NSEC3 RR for NXDOMAIN proving that covers the "
|
|
|
|
- "next closer to the closest encloser is empty.");
|
|
|
|
- }
|
|
|
|
- // Add the NSEC3 RR that covers the "next closer" name to the closest
|
|
|
|
- // encloser.
|
|
|
|
response_.addRRset(Message::SECTION_AUTHORITY,
|
|
response_.addRRset(Message::SECTION_AUTHORITY,
|
|
boost::const_pointer_cast<AbstractRRset>(
|
|
boost::const_pointer_cast<AbstractRRset>(
|
|
fresult1.next_proof),
|
|
fresult1.next_proof),
|
|
@@ -200,10 +191,7 @@ Query::addNSEC3NXDOMAINProof(ZoneFinder& finder) {
|
|
fresult1.closest_labels)));
|
|
fresult1.closest_labels)));
|
|
const ZoneFinder::FindNSEC3Result fresult2 =
|
|
const ZoneFinder::FindNSEC3Result fresult2 =
|
|
finder.findNSEC3(wildname, false);
|
|
finder.findNSEC3(wildname, false);
|
|
- if (!fresult2.closest_proof) {
|
|
|
|
- isc_throw(BadNSEC3, "NSEC3 for NXDOMAIN covering the wildcard "
|
|
|
|
- "RR at the closest encloser is empty.");
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
// Add the wildcard proof only when it's different from the NSEC3 RR
|
|
// Add the wildcard proof only when it's different from the NSEC3 RR
|
|
// that covers the "next closer" name to the closest encloser.
|
|
// that covers the "next closer" name to the closest encloser.
|
|
if (fresult1.next_proof->getName() != fresult2.closest_proof->getName()) {
|
|
if (fresult1.next_proof->getName() != fresult2.closest_proof->getName()) {
|