- Fix above stub queries for type NS and useless delegation point.

git-svn-id: file:///svn/unbound/trunk@4604 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2018-04-05 09:53:27 +00:00
parent 6f4451b761
commit 0a06c5bfa2
2 changed files with 9 additions and 1 deletions

View File

@ -1,6 +1,7 @@
5 April 2018: Wouter
- Combine write of tcp length and tcp query for dns over tls.
- nitpick fixes in example.conf.
- Fix above stub queries for type NS and useless delegation point.
3 April 2018: Wouter
- Fix #4043: make test fails due to v6 presentation issue in macOS.

View File

@ -1299,7 +1299,8 @@ processInitRequest(struct module_qstate* qstate, struct iter_qstate* iq,
delnamelen = iq->qchase.qname_len;
}
if(iq->qchase.qtype == LDNS_RR_TYPE_DS || iq->refetch_glue ||
(iq->qchase.qtype == LDNS_RR_TYPE_NS && qstate->prefetch_leeway)) {
(iq->qchase.qtype == LDNS_RR_TYPE_NS && qstate->prefetch_leeway
&& can_have_last_resort(qstate->env, delname, delnamelen, iq->qchase.qclass))) {
/* remove first label from delname, root goes to hints,
* but only to fetch glue, not for qtype=DS. */
/* also when prefetching an NS record, fetch it again from
@ -1439,6 +1440,12 @@ processInitRequest(struct module_qstate* qstate, struct iter_qstate* iq,
verbose(VERB_ALGO,
"cache delegation was useless:");
delegpt_log(VERB_ALGO, iq->dp);
if(!can_have_last_resort(qstate->env, delname, delnamelen, iq->qchase.qclass)) {
verbose(VERB_ALGO, "useless dp "
"but cannot go up, servfail");
return error_response(qstate, id,
LDNS_RCODE_SERVFAIL);
}
/* go up */
delname = iq->dp->name;
delnamelen = iq->dp->namelen;