]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
fix release-1.4.5
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 11 Jun 2010 14:24:25 +0000 (14:24 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 11 Jun 2010 14:24:25 +0000 (14:24 +0000)
git-svn-id: file:///svn/unbound/trunk@2146 be551aaa-1e26-0410-a405-d3ace91eadb9

iterator/iter_utils.c
iterator/iterator.c
iterator/iterator.h

index d33db3f539d1fff13f1b61af2eefe78cec36bb85..b2531449d9862681b888c0b6e73ab2672cac64d4 100644 (file)
@@ -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;
        }
 }
index 10c078803e29cf7bce124cad5ab039f130a4ce16..755a0e34f0624e63a0ea3c4f9daaff0ba0762006 100644 (file)
@@ -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++;
index 407d6c5984be3e1eceac389aaf692e1eadd18a4b..a5c233d177a48ec0a1eeb7b8ffbcb0337699db87 100644 (file)
@@ -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.