diff --git a/doc/Changelog b/doc/Changelog index 48c664197..5424eac03 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -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. diff --git a/iterator/iterator.c b/iterator/iterator.c index 74be2381c..4ed06d779 100644 --- a/iterator/iterator.c +++ b/iterator/iterator.c @@ -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]; }