mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- Fix queries being leaked above stub when refetching glue.
git-svn-id: file:///svn/unbound/trunk@4434 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
21d1989e05
commit
0df528cc9e
2 changed files with 15 additions and 5 deletions
|
|
@ -1,3 +1,6 @@
|
||||||
|
3 January 2018: Ralph
|
||||||
|
- Fix queries being leaked above stub when refetching glue.
|
||||||
|
|
||||||
2 January 2017: Wouter
|
2 January 2017: Wouter
|
||||||
- Fix that DS queries with referral replies are answered straight
|
- Fix that DS queries with referral replies are answered straight
|
||||||
away, without a repeat query picking the DS from cache.
|
away, without a repeat query picking the DS from cache.
|
||||||
|
|
|
||||||
|
|
@ -1374,16 +1374,23 @@ processInitRequest2(struct module_qstate* qstate, struct iter_qstate* iq,
|
||||||
log_query_info(VERB_QUERY, "resolving (init part 2): ",
|
log_query_info(VERB_QUERY, "resolving (init part 2): ",
|
||||||
&qstate->qinfo);
|
&qstate->qinfo);
|
||||||
|
|
||||||
|
delname = iq->qchase.qname;
|
||||||
|
delnamelen = iq->qchase.qname_len;
|
||||||
if(iq->refetch_glue) {
|
if(iq->refetch_glue) {
|
||||||
if(!iq->dp) {
|
if(!iq->dp) {
|
||||||
log_err("internal or malloc fail: no dp for refetch");
|
log_err("internal or malloc fail: no dp for refetch");
|
||||||
return error_response(qstate, id, LDNS_RCODE_SERVFAIL);
|
return error_response(qstate, id, LDNS_RCODE_SERVFAIL);
|
||||||
}
|
}
|
||||||
delname = iq->dp->name;
|
/* Do not send queries above stub, do not set delname to dp if
|
||||||
delnamelen = iq->dp->namelen;
|
* this is above stub without stub-first. */
|
||||||
} else {
|
struct iter_hints_stub* stub = hints_lookup_stub(
|
||||||
delname = iq->qchase.qname;
|
qstate->env->hints, iq->qchase.qname, iq->qchase.qclass,
|
||||||
delnamelen = iq->qchase.qname_len;
|
iq->dp);
|
||||||
|
if(!stub || !stub->dp->has_parent_side_NS ||
|
||||||
|
dname_subdomain_c(iq->dp->name, stub->dp->name)) {
|
||||||
|
delname = iq->dp->name;
|
||||||
|
delnamelen = iq->dp->namelen;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(iq->qchase.qtype == LDNS_RR_TYPE_DS || iq->refetch_glue) {
|
if(iq->qchase.qtype == LDNS_RR_TYPE_DS || iq->refetch_glue) {
|
||||||
if(!dname_is_root(delname))
|
if(!dname_is_root(delname))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue