]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix #804: lower num_target_queries for iterator also for failed
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 23 Aug 2016 08:49:01 +0000 (08:49 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 23 Aug 2016 08:49:01 +0000 (08:49 +0000)
  lookups.

git-svn-id: file:///svn/unbound/trunk@3831 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
iterator/iterator.c

index 9fa7d6ebfb8d9afeb14dee641614ff4b79341f31..bf5264231d1ae550cb165b4158938d38c7cb67da 100644 (file)
@@ -1,6 +1,8 @@
 23 August 2016: Wouter
        - Fix #804: unbound stops responding after outage.  Fixes queries
          that attempt to wait for an empty list of subqueries.
+       - Fix #804: lower num_target_queries for iterator also for failed
+         lookups.
 
 8 August 2016: Wouter
        - Note that OPENPGPKEY type is RFC 7929.
index adeb79ae19f8cf94968e079872918236a3bbd85c..cc7e9378c9e76c68a9a7995f3702fca35d973e6e 100644 (file)
@@ -216,6 +216,7 @@ error_supers(struct module_qstate* qstate, int id, struct module_qstate* super)
                qstate->qinfo.qtype == LDNS_RR_TYPE_AAAA) {
                /* mark address as failed. */
                struct delegpt_ns* dpns = NULL;
+               super_iq->num_target_queries--; 
                if(super_iq->dp)
                        dpns = delegpt_find_ns(super_iq->dp, 
                                qstate->qinfo.qname, qstate->qinfo.qname_len);
@@ -235,7 +236,6 @@ error_supers(struct module_qstate* qstate, int id, struct module_qstate* super)
                                log_err("out of memory adding missing");
                }
                dpns->resolved = 1; /* mark as failed */
-               super_iq->num_target_queries--; 
        }
        if(qstate->qinfo.qtype == LDNS_RR_TYPE_NS) {
                /* prime failed to get delegation */
@@ -2661,6 +2661,10 @@ processTargetResponse(struct module_qstate* qstate, int id,
        log_query_info(VERB_ALGO, "processTargetResponse", &qstate->qinfo);
        log_query_info(VERB_ALGO, "processTargetResponse super", &forq->qinfo);
 
+       /* Tell the originating event that this target query has finished
+        * (regardless if it succeeded or not). */
+       foriq->num_target_queries--;
+
        /* check to see if parent event is still interested (in orig name).  */
        if(!foriq->dp) {
                verbose(VERB_ALGO, "subq: parent not interested, was reset");
@@ -2676,10 +2680,6 @@ processTargetResponse(struct module_qstate* qstate, int id,
                return;
        }
 
-       /* Tell the originating event that this target query has finished
-        * (regardless if it succeeded or not). */
-       foriq->num_target_queries--;
-
        /* if iq->query_for_pside_glue then add the pside_glue (marked lame) */
        if(iq->pside_glue) {
                /* if the pside_glue is NULL, then it could not be found,