]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix resolution for domains like safesvc.com.cn. If the iterator
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 19 May 2010 12:55:49 +0000 (12:55 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 19 May 2010 12:55:49 +0000 (12:55 +0000)
         can not recurse further and it finds the delegation in a state
         where it would otherwise have rejected it outhand if so received
         from a cache lookup, then it can try to ask higherup (with loop
         protection).

git-svn-id: file:///svn/unbound/trunk@2113 be551aaa-1e26-0410-a405-d3ace91eadb9

iterator/iterator.c

index 0ed946bd32b761f68d310b68cc6bc46169cd4ece..ce0e6419b5d14617b41581eeaac3864cf4955e9e 100644 (file)
@@ -1503,6 +1503,22 @@ processQueryTargets(struct module_qstate* qstate, struct iter_qstate* iq,
                                        return next_state(iq, 
                                                INIT_REQUEST_STATE);
                                }
+                               /* is the current dp useless, like it would
+                                * be classified useless if picked from the
+                                * cache like this? If so, go back up */
+                               if(iter_dp_is_useless(&qstate->qinfo, 
+                                       qstate->query_flags, iq->dp) && 
+                                       !iq->dp->target_list) {
+                                       /* extra target list check because
+                                        * those become available again when
+                                        * lookup up from the cache */
+                                       verbose(VERB_QUERY, "delegation is "
+                                               "useless, try higher up");
+                                       iq->deleg_msg = NULL;
+                                       iq->query_restart_count++;
+                                       return next_state(iq, 
+                                               INIT_REQUEST_STATE);
+                               }
 
                                verbose(VERB_QUERY, "out of query targets -- "
                                        "returning SERVFAIL");