mirror of
https://github.com/NLnetLabs/unbound.git
synced 2024-09-21 06:37:08 +00:00
fix
git-svn-id: file:///svn/unbound/trunk@2146 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
1f0f85b59a
commit
b014aac438
@ -946,18 +946,20 @@ void iter_merge_retry_counts(struct delegpt* dp, struct delegpt* old)
|
||||
}
|
||||
}
|
||||
prev = NULL;
|
||||
a = dp->result_list;
|
||||
a = dp->usable_list;
|
||||
while(a) {
|
||||
if(a->attempts >= OUTBOUND_MSG_RETRY) {
|
||||
log_addr(VERB_ALGO, "remove from usable list dp",
|
||||
&a->addr, a->addrlen);
|
||||
/* remove from result list */
|
||||
if(prev)
|
||||
prev->next_result = a->next_result;
|
||||
else dp->result_list = a->next_result;
|
||||
prev->next_usable = a->next_usable;
|
||||
else dp->usable_list = a->next_usable;
|
||||
/* prev stays the same */
|
||||
a = a->next_result;
|
||||
a = a->next_usable;
|
||||
continue;
|
||||
}
|
||||
prev = a;
|
||||
a = a->next_result;
|
||||
a = a->next_usable;
|
||||
}
|
||||
}
|
||||
|
@ -1401,6 +1401,7 @@ processLastResort(struct module_qstate* qstate, struct iter_qstate* iq,
|
||||
/* if: no parent NS in cache - go up one level */
|
||||
verbose(VERB_ALGO, "try to grab parent NS");
|
||||
iq->store_parent_NS = 1;
|
||||
iq->parent_NS_old_dp = iq->dp;
|
||||
iq->deleg_msg = NULL;
|
||||
iq->refetch_glue = 1;
|
||||
iq->query_restart_count++;
|
||||
@ -1807,7 +1808,6 @@ processQueryResponse(struct module_qstate* qstate, struct iter_qstate* iq,
|
||||
qstate->region);
|
||||
return final_state(iq);
|
||||
} else if(type == RESPONSE_TYPE_REFERRAL) {
|
||||
struct delegpt* old_dp = iq->dp;
|
||||
/* REFERRAL type responses get a reset of the
|
||||
* delegation point, and back to the QUERYTARGETS_STATE. */
|
||||
verbose(VERB_DETAIL, "query response was REFERRAL");
|
||||
@ -1865,8 +1865,8 @@ processQueryResponse(struct module_qstate* qstate, struct iter_qstate* iq,
|
||||
qstate->region, iq->dp))
|
||||
return error_response(qstate, id, LDNS_RCODE_SERVFAIL);
|
||||
if(iq->store_parent_NS && query_dname_compare(iq->dp->name,
|
||||
old_dp->name) == 0)
|
||||
iter_merge_retry_counts(iq->dp, old_dp);
|
||||
iq->parent_NS_old_dp->name) == 0)
|
||||
iter_merge_retry_counts(iq->dp, iq->parent_NS_old_dp);
|
||||
delegpt_log(VERB_ALGO, iq->dp);
|
||||
/* Count this as a referral. */
|
||||
iq->referral_count++;
|
||||
|
@ -252,6 +252,8 @@ struct iter_qstate {
|
||||
* Enabled once it hits resolution problems, to throttle retries.
|
||||
*/
|
||||
int store_parent_NS;
|
||||
/** the old delegation point with retry counts */
|
||||
struct delegpt* parent_NS_old_dp;
|
||||
|
||||
/**
|
||||
* The query is for parent-side glue(A or AAAA) for a nameserver.
|
||||
|
Loading…
Reference in New Issue
Block a user