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