]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix query for refetch_glue of stub leaking to internet.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 15 Jun 2017 15:00:07 +0000 (15:00 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 15 Jun 2017 15:00:07 +0000 (15:00 +0000)
git-svn-id: file:///svn/unbound/trunk@4227 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
iterator/iterator.c

index e78cf6e9b6805208dc2a31cb88c7856b8af6f8e1..f99a0481f98d73758ea4e0e3724a5d68965465c2 100644 (file)
@@ -1,6 +1,7 @@
 15 June 2017: Wouter
        - Fix stub zone queries leaking to the internet for
          harden-referral-path ns checks.
+       - Fix query for refetch_glue of stub leaking to internet.
 
 13 June 2017: Wouter
        - Fix #1279: Memory leak on reload when python module is enabled.
index 2c981628b92b7077310211092ac38d65e9ba2f43..205ab0d154072e73cfb1a678440640405856800c 100644 (file)
@@ -1071,6 +1071,20 @@ processInitRequest(struct module_qstate* qstate, struct iter_qstate* iq,
                return next_state(iq, COLLECT_CLASS_STATE);
        }
 
+       /*
+        * If we are restricted by a forward-zone or a stub-zone, we
+        * can't re-fetch glue for this delegation point.
+        * we won’t try to re-fetch glue if the iq->dp is null.
+        */
+       if (iq->refetch_glue &&
+               iq->dp &&
+               !can_have_last_resort(qstate->env,
+                                     iq->dp->name,
+                                     iq->dp->namelen,
+                                     iq->qchase.qclass)) {
+           iq->refetch_glue = 0;
+       }
+
        /* Resolver Algorithm Step 1 -- Look for the answer in local data. */
 
        /* This either results in a query restart (CNAME cache response), a