|
@@ -317,6 +317,7 @@ DatabaseClient::Finder::find(const isc::dns::Name& name,
|
|
// NXDOMAIN and NXRRSET
|
|
// NXDOMAIN and NXRRSET
|
|
bool records_found = false;
|
|
bool records_found = false;
|
|
bool glue_ok(options & FIND_GLUE_OK);
|
|
bool glue_ok(options & FIND_GLUE_OK);
|
|
|
|
+ bool dnssec_data(options & FIND_DNSSEC);
|
|
isc::dns::RRsetPtr result_rrset;
|
|
isc::dns::RRsetPtr result_rrset;
|
|
ZoneFinder::Result result_status = SUCCESS;
|
|
ZoneFinder::Result result_status = SUCCESS;
|
|
FoundRRsets found;
|
|
FoundRRsets found;
|
|
@@ -390,7 +391,7 @@ DatabaseClient::Finder::find(const isc::dns::Name& name,
|
|
// And we don't consider the NS in origin
|
|
// And we don't consider the NS in origin
|
|
|
|
|
|
static WantedTypes final_types(empty_types + RRType::CNAME() +
|
|
static WantedTypes final_types(empty_types + RRType::CNAME() +
|
|
- RRType::NS());
|
|
|
|
|
|
+ RRType::NS() + RRType::NSEC());
|
|
found = getRRsets(name, final_types + type, name != origin);
|
|
found = getRRsets(name, final_types + type, name != origin);
|
|
records_found = found.first;
|
|
records_found = found.first;
|
|
|
|
|
|
@@ -505,6 +506,15 @@ DatabaseClient::Finder::find(const isc::dns::Name& name,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ } else if (dnssec_data) {
|
|
|
|
+ // This is the "usual" NXRRSET case
|
|
|
|
+ // So in case they want DNSSEC, provide the NSEC
|
|
|
|
+ // (which should be available already here)
|
|
|
|
+ result_status = NXRRSET;
|
|
|
|
+ const FoundIterator nci(found.second.find(RRType::NSEC()));
|
|
|
|
+ if (nci != found.second.end()) {
|
|
|
|
+ result_rrset = nci->second;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|