From: Ralph Dolmans Date: Tue, 12 Jun 2018 13:09:14 +0000 (+0000) Subject: - Don't count CNAME response types received during qname minimisation as query X-Git-Tag: release-1.7.3rc1~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=00a0cabf7fb82fe32ff57162268f2f30f7719665;p=thirdparty%2Funbound.git - Don't count CNAME response types received during qname minimisation as query restart. git-svn-id: file:///svn/unbound/trunk@4728 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/doc/Changelog b/doc/Changelog index 0e207ca0d..ee84008e3 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,7 @@ +12 June 2018: Ralph + - Don't count CNAME response types received during qname minimisation as + query restart. + 12 June 2018: Wouter - #4102 for NSD, but for Unbound. Named unix pipes do not use certificate and key files, access can be restricted with file and diff --git a/iterator/iterator.c b/iterator/iterator.c index c0bc89617..58a9bff66 100644 --- a/iterator/iterator.c +++ b/iterator/iterator.c @@ -2770,16 +2770,18 @@ processQueryResponse(struct module_qstate* qstate, struct iter_qstate* iq, /* set the current request's qname to the new value. */ iq->qchase.qname = sname; iq->qchase.qname_len = snamelen; - if (qstate->env->cfg->qname_minimisation) - iq->minimisation_state = INIT_MINIMISE_STATE; /* Clear the query state, since this is a query restart. */ iq->deleg_msg = NULL; iq->dp = NULL; iq->dsns_point = NULL; iq->auth_zone_response = 0; - /* Note the query restart. */ - iq->query_restart_count++; iq->sent_count = 0; + if(iq->minimisation_state != MINIMISE_STATE) + /* Only count as query restart when it is not an extra + * query as result of qname minimisation. */ + iq->query_restart_count++; + if(qstate->env->cfg->qname_minimisation) + iq->minimisation_state = INIT_MINIMISE_STATE; /* stop current outstanding queries. * FIXME: should the outstanding queries be waited for and