]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- implemented forward_first for the root.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 23 Jul 2012 13:42:07 +0000 (13:42 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 23 Jul 2012 13:42:07 +0000 (13:42 +0000)
git-svn-id: file:///svn/unbound/trunk@2722 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
iterator/iterator.c

index 277cc285cd5763f05904887233e76c21ddc60773..4fba2c7d343e488100f77b3099abf94c60e5886b 100644 (file)
@@ -1,5 +1,6 @@
 23 July 2012: Wouter
        - fix missing break for GOST DS hash function.
+       - implemented forward_first for the root.
 
 20 July 2012: Wouter
        - Fix bug#452 and another assertion failure in mesh.c, makes
index 6399fdeec0a7dd62fc93f12f9a1a4ebe9dbf288f..14f1bc6a064000e63e036dbe2baf128a03116432 100644 (file)
@@ -1430,7 +1430,24 @@ processLastResort(struct module_qstate* qstate, struct iter_qstate* iq,
        verbose(VERB_ALGO, "No more query targets, attempting last resort");
        log_assert(iq->dp);
 
-       if(!iq->dp->has_parent_side_NS) {
+       if(!iq->dp->has_parent_side_NS && dname_is_root(iq->dp->name)) {
+               struct delegpt* p = hints_lookup_root(qstate->env->hints,
+                       iq->qchase.qclass);
+               if(p) {
+                       struct delegpt_ns* ns;
+                       struct delegpt_addr* a;
+                       for(ns = p->nslist; ns; ns=ns->next) {
+                               (void)delegpt_add_ns(iq->dp, qstate->region,
+                                       ns->name, (int)ns->lame);
+                       }
+                       for(a = p->target_list; a; a=a->next_target) {
+                               (void)delegpt_add_addr(iq->dp, qstate->region,
+                                       &a->addr, a->addrlen, a->bogus,
+                                       a->lame);
+                       }
+               }
+               iq->dp->has_parent_side_NS = 1;
+       } else if(!iq->dp->has_parent_side_NS) {
                if(!iter_lookup_parent_NS_from_cache(qstate->env, iq->dp,
                        qstate->region, &qstate->qinfo) 
                        || !iq->dp->has_parent_side_NS) {