From: W.C.A. Wijngaards Date: Thu, 28 Apr 2022 12:51:47 +0000 (+0200) Subject: - Fix #670: SERVFAIL problems with unbound 1.15.0 running on X-Git-Tag: release-1.16.0rc1~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b61b0af5d6c94622e07b9be1a524f99dfc73f630;p=thirdparty%2Funbound.git - Fix #670: SERVFAIL problems with unbound 1.15.0 running on OpenBSD 7.1. --- diff --git a/doc/Changelog b/doc/Changelog index 1fdae1fde..fd4177d29 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,7 @@ +28 April 2022: Wouter + - Fix #670: SERVFAIL problems with unbound 1.15.0 running on + OpenBSD 7.1. + 8 April 2022: Wouter - Fix zonemd check to allow unsupported algorithms to load. If there are only unsupported algorithms, or unsupported schemes, diff --git a/iterator/iterator.c b/iterator/iterator.c index 29d2e79ed..3cfb286f4 100644 --- a/iterator/iterator.c +++ b/iterator/iterator.c @@ -1831,6 +1831,23 @@ query_for_targets(struct module_qstate* qstate, struct iter_qstate* iq, int missing; int toget = 0; + iter_mark_cycle_targets(qstate, iq->dp); + missing = (int)delegpt_count_missing_targets(iq->dp); + log_assert(maxtargets != 0); /* that would not be useful */ + + /* Generate target requests. Basically, any missing targets + * are queried for here, regardless if it is necessary to do + * so to continue processing. */ + if(maxtargets < 0 || maxtargets > missing) + toget = missing; + else toget = maxtargets; + if(toget == 0) { + *num = 0; + return 1; + } + + /* now that we are sure that a target query is going to be made, + * check the limits. */ if(iq->depth == ie->max_dependency_depth) return 0; if(iq->depth > 0 && iq->target_count && @@ -1850,20 +1867,6 @@ query_for_targets(struct module_qstate* qstate, struct iter_qstate* iq, return 0; } - iter_mark_cycle_targets(qstate, iq->dp); - missing = (int)delegpt_count_missing_targets(iq->dp); - log_assert(maxtargets != 0); /* that would not be useful */ - - /* Generate target requests. Basically, any missing targets - * are queried for here, regardless if it is necessary to do - * so to continue processing. */ - if(maxtargets < 0 || maxtargets > missing) - toget = missing; - else toget = maxtargets; - if(toget == 0) { - *num = 0; - return 1; - } /* select 'toget' items from the total of 'missing' items */ log_assert(toget <= missing);