+11 June 2010: Wouter
+ - When retry to parent the retrycount is not wiped, so failed
+ nameservers are not tried again.
+ - iana portlist updated.
+
10 June 2010: Wouter
- Fix bug where a long loop could be entered, now cycle detection
has a loop-counter and maximum search amount.
else a->attempts = 0;
}
}
+
+void iter_merge_retry_counts(struct delegpt* dp, struct delegpt* old)
+{
+ struct delegpt_addr* a, *o, *prev;
+ for(a=dp->target_list; a; a = a->next_target) {
+ o = delegpt_find_addr(old, &a->addr, a->addrlen);
+ if(o) {
+ log_addr(VERB_ALGO, "copy attempt count previous dp",
+ &a->addr, a->addrlen);
+ a->attempts = o->attempts;
+ }
+ }
+ prev = NULL;
+ a = dp->result_list;
+ while(a) {
+ if(a->attempts >= OUTBOUND_MSG_RETRY) {
+ /* remove from result list */
+ if(prev)
+ prev->next_result = a->next_result;
+ else dp->result_list = a->next_result;
+ /* prev stays the same */
+ a = a->next_result;
+ continue;
+ }
+ prev = a;
+ a = a->next_result;
+ }
+}
*/
void iter_dec_attempts(struct delegpt* dp, int d);
+/**
+ * Add retry counts from older delegpt to newer delegpt.
+ * Does not waste time on timeout'd (or other failing) addresses.
+ * @param dp: new delegationpoint.
+ * @param old: old delegationpoint.
+ */
+void iter_merge_retry_counts(struct delegpt* dp, struct delegpt* old);
+
#endif /* ITERATOR_ITER_UTILS_H */
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");
if(!cache_fill_missing(qstate->env, iq->qchase.qclass,
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);
delegpt_log(VERB_ALGO, iq->dp);
/* Count this as a referral. */
iq->referral_count++;
5679,
5680,
5681,
+5682,
5688,
5689,
5713,