[unbound/el6] * Wed Nov 14 2012 Paul Wouters <pwouters at redhat.com> - 1.4.18-6 - Patch to ensure stub-zone's aren't

Paul Wouters pwouters at fedoraproject.org
Wed Nov 14 18:30:14 UTC 2012


commit 79cec3db2b3be6cdeb8453c2b0862348f06c84e1
Author: Paul Wouters <pwouters at redhat.com>
Date:   Wed Nov 14 13:27:20 2012 -0500

    * Wed Nov 14 2012 Paul Wouters <pwouters at redhat.com> - 1.4.18-6
    - Patch to ensure stub-zone's aren't lost when reconfiguring forwarder

 unbound-1.4.18-stub-hole.patch |   44 ++++++++++++++++++++++++++++++++++++++++
 unbound.spec                   |    5 ++++
 2 files changed, 49 insertions(+), 0 deletions(-)
---
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 */
diff --git a/unbound.spec b/unbound.spec
index 1c2b48f..3b679c9 100644
--- a/unbound.spec
+++ b/unbound.spec
@@ -30,6 +30,7 @@ Source15: unbound-monthly.cron
 Patch1: unbound-1.2-glob.patch
 Patch2: unbound-1.4.18-openssl_threads.patch
 Patch3: unbound-1.4.18-includeglob.patch
+Patch4: unbound-1.4.18-stub-hole.patch
 
 Group: System Environment/Daemons
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -104,6 +105,7 @@ Python modules and extensions for unbound
 %patch1 -p1
 %patch2 -p0
 %patch3 -p1
+%patch4 -p0
 
 %build
 %configure  --with-ldns= --with-libevent --with-pthreads --with-ssl \
@@ -253,6 +255,9 @@ fi
 %postun libs -p /sbin/ldconfig
 
 %changelog
+* Wed Nov 14 2012 Paul Wouters <pwouters at redhat.com> - 1.4.18-6
+- Patch to ensure stub-zone's aren't lost when reconfiguring forwarder
+
 * Sat Nov 03 2012 Paul Wouters <pwouters at redhat.com> - 1.4.18-4
 - Patch to allow wildcards in include: statements
 - Add directories /etc/unbound/keys.d,conf.d,local.d with


More information about the scm-commits mailing list