nsec3zone = dk.getNSEC3PARAM(bbd->d_name, &ns3pr);
}
else
- nsec3zone = getNSEC3PARAM(bbd->d_name, &ns3pr);
+ nsec3zone = getNSEC3PARAMuncached(bbd->d_name, &ns3pr);
auto records = std::make_shared<recordstorage_t>();
ZoneParserTNG zpt(bbd->d_filename, bbd->d_name, s_binddirectory, d_upgradeContent);
bbd->d_checknow = false;
bbd->d_status = "parsed into memory at " + nowTime();
bbd->d_records = LookButDontTouch<recordstorage_t>(records);
+ bbd->d_nsec3zone = nsec3zone;
+ bbd->d_nsec3param = ns3pr;
}
/** THIS IS AN INTERNAL FUNCTION! It does moadnsparser prio impedance matching
if (!safeGetBBDomainInfo(id, &bbd))
return false;
- NSEC3PARAMRecordContent ns3pr;
-
- bool nsec3zone;
- if (d_hybrid) {
- DNSSECKeeper dk;
- nsec3zone = dk.getNSEC3PARAM(bbd.d_name, &ns3pr);
- }
- else
- nsec3zone = getNSEC3PARAM(bbd.d_name, &ns3pr);
-
shared_ptr<const recordstorage_t> records = bbd.d_records.get();
- if (!nsec3zone) {
+ if (!bbd.d_nsec3zone) {
return findBeforeAndAfterUnhashed(records, qname, unhashed, before, after);
}
else {
mutable bool d_checknow; //!< if this domain has been flagged for a check
bool d_loaded; //!< if a domain is loaded
bool d_wasRejectedLastReload{false}; //!< if the domain was rejected during Bind2Backend::queueReloadAndStore
+ bool d_nsec3zone{false};
+ NSEC3PARAMRecordContent d_nsec3param;
private:
time_t getCtime();
shared_ptr<SSQLite3> d_dnssecdb;
bool getNSEC3PARAM(const DNSName& name, NSEC3PARAMRecordContent* ns3p);
void setLastCheck(uint32_t domain_id, time_t lastcheck);
+ bool getNSEC3PARAMuncached(const DNSName& name, NSEC3PARAMRecordContent* ns3p);
class handle
{
public:
}
bool Bind2Backend::getNSEC3PARAM(const DNSName& name, NSEC3PARAMRecordContent* ns3p)
+{
+ BB2DomainInfo bbd;
+ if (!safeGetBBDomainInfo(name, &bbd))
+ return false;
+
+ if (ns3p) {
+ *ns3p = bbd.d_nsec3param;
+ }
+
+ return bbd.d_nsec3zone;
+}
+
+bool Bind2Backend::getNSEC3PARAMuncached(const DNSName& name, NSEC3PARAMRecordContent* ns3p)
{
if (!d_dnssecdb || d_hybrid)
return false;