continue;
/* generate subrequest for it */
- log_nametypeclass(VERB_ALGO, "must fetch addr", s->rk.dname,
- ntohs(s->rk.type), ntohs(s->rk.rrset_class));
+ log_nametypeclass(VERB_ALGO, "schedule addr fetch",
+ s->rk.dname, ntohs(s->rk.type),
+ ntohs(s->rk.rrset_class));
if(!generate_sub_request(s->rk.dname, s->rk.dname_len,
ntohs(s->rk.type), ntohs(s->rk.rrset_class),
qstate, id, iq,
return;
}
- log_nametypeclass(VERB_ALGO, "must fetch ns",
+ log_nametypeclass(VERB_ALGO, "schedule ns fetch",
iq->dp->name, LDNS_RR_TYPE_NS, iq->qchase.qclass);
if(!generate_sub_request(iq->dp->name, iq->dp->namelen,
LDNS_RR_TYPE_NS, iq->qchase.qclass, qstate, id, iq,
qstate->return_msg = NULL;
}
+ /* validate the root or stub after priming (if enabled).
+ * This is the same query as the prime query, but with validation.
+ * Now that we are primed, the additional queries that validation
+ * may need can be resolved, such as DLV. */
+ if(qstate->env->cfg->harden_referral_path) {
+ struct module_qstate* subq = NULL;
+ log_nametypeclass(VERB_ALGO, "schedule prime validation",
+ qstate->qinfo.qname, qstate->qinfo.qtype,
+ qstate->qinfo.qclass);
+ if(!generate_sub_request(qstate->qinfo.qname,
+ qstate->qinfo.qname_len, qstate->qinfo.qtype,
+ qstate->qinfo.qclass, qstate, id, iq,
+ INIT_REQUEST_STATE, FINISHED_STATE, &subq, 1)) {
+ log_err("out of memory generating prime check");
+ }
+ generate_a_aaaa_check(qstate, iq, id);
+ }
+
/* This event is finished. */
qstate->ext_state[id] = module_finished;
return 0;