]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Fix max depth check.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 16 Jun 2009 09:06:52 +0000 (09:06 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 16 Jun 2009 09:06:52 +0000 (09:06 +0000)
git-svn-id: file:///svn/unbound/trunk@1660 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
iterator/iterator.c

index 48c66419792b36a118dc43fd55abd7d27eb778e3..5424eac03a5a2a53256a5e25dd25020226d21428 100644 (file)
@@ -1,3 +1,7 @@
+16 June 2009: Wouter
+       - Fixup opportunistic target query generation to it does not
+         generate queries that are known to fail.
+
 15 June 2009: Wouter
        - iana portlist updated.
 
index 74be2381c17e18e6bb7b7858b52b508b6c38559b..4ed06d7792f1411451acacf95dda2be015d20c8a 100644 (file)
@@ -1269,7 +1269,10 @@ processQueryTargets(struct module_qstate* qstate, struct iter_qstate* iq,
        }
 
        tf_policy = 0;
-       if(iq->depth <= ie->max_dependency_depth) {
+       /* < not <=, because although the array is large enough for <=, the
+        * generated query will immediately be discarded due to depth and
+        * that servfail is cached, which is not good as opportunism goes. */
+       if(iq->depth < ie->max_dependency_depth) {
                tf_policy = ie->target_fetch_policy[iq->depth];
        }