]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Don't count CNAME response types received during qname minimisation as query
authorRalph Dolmans <ralph@nlnetlabs.nl>
Tue, 12 Jun 2018 13:09:14 +0000 (13:09 +0000)
committerRalph Dolmans <ralph@nlnetlabs.nl>
Tue, 12 Jun 2018 13:09:14 +0000 (13:09 +0000)
  restart.

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

doc/Changelog
iterator/iterator.c

index 0e207ca0dc25bb5e49054dd1e940e7dfdd94e1bc..ee84008e326bf6cc955d84d9e9048fdc21305a88 100644 (file)
@@ -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
index c0bc89617744168d1def3fe255b5d8001cc92e73..58a9bff6634c7400dad5890464411075c74c872d 100644 (file)
@@ -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