From eb251481230c4ef23a4dc176be09096b381a0b0a Mon Sep 17 00:00:00 2001 From: Ralph Dolmans Date: Mon, 4 Sep 2017 15:15:27 +0000 Subject: [PATCH] - Fix #1412: QNAME minimisation strict mode not honored git-svn-id: file:///svn/unbound/trunk@4337 be551aaa-1e26-0410-a405-d3ace91eadb9 --- doc/Changelog | 3 +++ iterator/iterator.c | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/doc/Changelog b/doc/Changelog index 7b1c47acf..7ba78b144 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,6 @@ +4 September 2017: Ralph + - Fix #1412: QNAME minimisation strict mode not honored + 4 September 2017: Wouter - tag 1.6.6rc1 - makedist fix for windows binaries, with openssl 1.1.0 windres fix, diff --git a/iterator/iterator.c b/iterator/iterator.c index 2f62915a5..01ac883e8 100644 --- a/iterator/iterator.c +++ b/iterator/iterator.c @@ -2169,7 +2169,6 @@ processQueryTargets(struct module_qstate* qstate, struct iter_qstate* iq, } } if(iq->minimisation_state == SKIP_MINIMISE_STATE) { - iq->minimise_timeout_count++; if(iq->minimise_timeout_count < MAX_MINIMISE_TIMEOUT_COUNT) /* Do not increment qname, continue incrementing next * iteration */ @@ -2210,6 +2209,8 @@ processQueryTargets(struct module_qstate* qstate, struct iter_qstate* iq, if(!(iq->chase_flags & BIT_RD) && !iq->ratelimit_ok) infra_ratelimit_dec(qstate->env->infra_cache, iq->dp->name, iq->dp->namelen, *qstate->env->now); + if(qstate->env->cfg->qname_minimisation) + iq->minimisation_state = SKIP_MINIMISE_STATE; return next_state(iq, QUERYTARGETS_STATE); } outbound_list_insert(&iq->outlist, outq); @@ -2259,8 +2260,10 @@ processQueryResponse(struct module_qstate* qstate, struct iter_qstate* iq, if(iq->response == NULL) { /* Don't increment qname when QNAME minimisation is enabled */ - if(qstate->env->cfg->qname_minimisation) + if(qstate->env->cfg->qname_minimisation) { + iq->minimise_timeout_count++; iq->minimisation_state = SKIP_MINIMISE_STATE; + } iq->chase_to_rd = 0; iq->dnssec_lame_query = 0; verbose(VERB_ALGO, "query response was timeout");