mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-09-29 05:04:57 +02:00
- Validate QNAME minimised NXDOMAIN responses.
- If QNAME minimisation is enabled, do cache lookup for QTYPE NS in harden-below-nxdomain. git-svn-id: file:///svn/unbound/trunk@3682 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
@@ -2265,6 +2265,26 @@ processQueryResponse(struct module_qstate* qstate, struct iter_qstate* iq,
|
||||
if(FLAGS_GET_RCODE(iq->response->rep->flags) !=
|
||||
LDNS_RCODE_NOERROR)
|
||||
iq->minimisation_state = DONOT_MINIMISE_STATE;
|
||||
/* Make subrequest to validate intermediate NXDOMAIN if
|
||||
* harden-below-nxdomain is enabled. */
|
||||
if(FLAGS_GET_RCODE(iq->response->rep->flags) ==
|
||||
LDNS_RCODE_NXDOMAIN &&
|
||||
qstate->env->cfg->harden_below_nxdomain) {
|
||||
struct module_qstate* subq = NULL;
|
||||
log_query_info(VERB_QUERY,
|
||||
"schedule NXDOMAIN validation:",
|
||||
&iq->response->qinfo);
|
||||
if(!generate_sub_request(
|
||||
iq->response->qinfo.qname,
|
||||
iq->response->qinfo.qname_len,
|
||||
iq->response->qinfo.qtype,
|
||||
iq->response->qinfo.qclass,
|
||||
qstate, id, iq, INIT_REQUEST_STATE,
|
||||
FINISHED_STATE, &subq, 1)) {
|
||||
verbose(VERB_ALGO,
|
||||
"could not validate NXDOMAIN response");
|
||||
}
|
||||
}
|
||||
return next_state(iq, QUERYTARGETS_STATE);
|
||||
}
|
||||
return final_state(iq);
|
||||
|
||||
Reference in New Issue
Block a user