From: Wouter Wijngaards Date: Tue, 23 Aug 2016 08:49:01 +0000 (+0000) Subject: - Fix #804: lower num_target_queries for iterator also for failed X-Git-Tag: release-1.5.10~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9bc918fa7b1db463731be04521d9af7c39862c99;p=thirdparty%2Funbound.git - Fix #804: lower num_target_queries for iterator also for failed lookups. git-svn-id: file:///svn/unbound/trunk@3831 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/doc/Changelog b/doc/Changelog index 9fa7d6ebf..bf5264231 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -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. diff --git a/iterator/iterator.c b/iterator/iterator.c index adeb79ae1..cc7e9378c 100644 --- a/iterator/iterator.c +++ b/iterator/iterator.c @@ -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,