From e0ff8324c9c254d5eac21252219985d4202cf710 Mon Sep 17 00:00:00 2001 From: Paul Wouters Date: Fri, 9 Nov 2012 13:39:44 -0500 Subject: [PATCH] Added unbound-1.4.18-stub-hole.patch patch file --- unbound-1.4.18-stub-hole.patch | 44 ++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 unbound-1.4.18-stub-hole.patch diff --git a/unbound-1.4.18-stub-hole.patch b/unbound-1.4.18-stub-hole.patch new file mode 100644 index 0000000..834132b --- /dev/null +++ b/unbound-1.4.18-stub-hole.patch @@ -0,0 +1,44 @@ +Index: iterator/iter_fwd.c +=================================================================== +--- iterator/iter_fwd.c (revision 2780) ++++ iterator/iter_fwd.c (working copy) +@@ -270,25 +270,6 @@ + return 1; + } + +-/** see if zone needs to have a hole inserted */ +-static int +-need_hole_insert(rbtree_t* tree, struct iter_forward_zone* zone) +-{ +- struct iter_forward_zone k; +- if(rbtree_search(tree, zone)) +- return 0; /* exact match exists */ +- k = *zone; +- k.node.key = &k; +- /* search up the tree */ +- do { +- dname_remove_label(&k.name, &k.namelen); +- k.namelabs --; +- if(rbtree_search(tree, &k)) +- return 1; /* found an upper forward zone, need hole */ +- } while(k.namelabs > 1); +- return 0; /* no forwards above, no holes needed */ +-} +- + /** insert a stub hole (if necessary) for stub name */ + static int + fwd_add_stub_hole(struct iter_forwards* fwd, uint16_t c, uint8_t* nm) +@@ -298,11 +279,8 @@ + key.dclass = c; + key.name = nm; + key.namelabs = dname_count_size_labels(key.name, &key.namelen); +- if(need_hole_insert(fwd->tree, &key)) { +- return forwards_insert_data(fwd, key.dclass, key.name, +- key.namelen, key.namelabs, NULL); +- } +- return 1; ++ return forwards_insert_data(fwd, key.dclass, key.name, ++ key.namelen, key.namelabs, NULL); + } + + /** make NULL entries for stubs */