]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix #670: SERVFAIL problems with unbound 1.15.0 running on
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 28 Apr 2022 12:51:47 +0000 (14:51 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 28 Apr 2022 12:51:47 +0000 (14:51 +0200)
  OpenBSD 7.1.

doc/Changelog
iterator/iterator.c

index 1fdae1fde8082318050df8b6261900c311bccf41..fd4177d296de4b3c11674774b5ef5a528174aa83 100644 (file)
@@ -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,
index 29d2e79ed8f1a7ac568fa42c068598d3d80c602a..3cfb286f44914a0f1bf10b08e2b3107b8c53dd8c 100644 (file)
@@ -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);