}
}
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;
}
}
/* 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++;
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");
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++;
* 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.