[vpnc] * unbound patch was actually not applied

Paul Wouters pwouters at fedoraproject.org
Fri Nov 15 18:05:31 UTC 2013


commit df0906121b052568da4bd8153c811b1b8f0941b9
Author: Paul Wouters <pwouters at redhat.com>
Date:   Fri Nov 15 12:59:45 2013 -0500

    * unbound patch was actually not applied

 vpnc-0.5.3-unbound-support.patch |   37 -------------------------------------
 vpnc-script                      |   21 +++++++++++++++++++++
 vpnc.spec                        |    6 ++++--
 3 files changed, 25 insertions(+), 39 deletions(-)
---
diff --git a/vpnc-script b/vpnc-script
index c5f947a..53ff9b8 100644
--- a/vpnc-script
+++ b/vpnc-script
@@ -86,6 +86,9 @@ if [ -x /sbin/resolvconf ]; then # Optional tool on Debian, Ubuntu, Gentoo
 elif [ -x /sbin/modify_resolvconf ]; then # Mandatory tool on Suse earlier than 11.1
 	MODIFYRESOLVCONF=modify_resolvconf_suse
 	RESTORERESOLVCONF=restore_resolvconf_suse
+elif command -v unbound-control > /dev/null && unbound-control status &> /dev/null; then 
+        MODIFYRESOLVCONF=modify_resolvconf_unbound
+        RESTORERESOLVCONF=restore_resolvconf_unbound
 else # Generic for any OS
 	MODIFYRESOLVCONF=modify_resolvconf_generic
 	RESTORERESOLVCONF=restore_resolvconf_generic
@@ -470,6 +473,24 @@ restore_resolvconf_manager() {
 	/sbin/resolvconf -d $TUNDEV
 }
 
+# === resolv.conf handling via unbound =========
+
+modify_resolvconf_unbound() {
+        if [ -n "$CISCO_DEF_DOMAIN" ]; then
+                unbound-control forward_add +i ${CISCO_DEF_DOMAIN} ${INTERNAL_IP4_DNS[@]}
+		unbound-control flush_requestlist
+                unbound-control flush_zone ${CISCO_DEF_DOMAIN}
+        fi
+}
+
+restore_resolvconf_unbound() {
+        if [ -n "$CISCO_DEF_DOMAIN" ]; then
+                unbound-control forward_remove +i ${CISCO_DEF_DOMAIN}
+                unbound-control flush_zone ${CISCO_DEF_DOMAIN}
+		unbound-control	flush_requestlist
+        fi
+}
+
 # ========= Toplevel state handling  =======================================
 
 kernel_is_2_6_or_above() {
diff --git a/vpnc.spec b/vpnc.spec
index 2924a9c..2a9c27f 100644
--- a/vpnc.spec
+++ b/vpnc.spec
@@ -2,7 +2,7 @@
 
 Name:		vpnc
 Version:	0.5.3
-Release:	19%{snapshot}%{?dist}
+Release:	20%{snapshot}%{?dist}
 
 Summary:	IPSec VPN client compatible with Cisco equipment
 
@@ -22,7 +22,6 @@ Source8:	%{name}-tmpfiles.conf
 
 Patch1:		vpnc-0.5.1-dpd.patch
 Patch2:		vpnc-0.5.3-use-autodie.patch
-Patch3:		vpnc-0.5.3-unbound-support.patch
 
 BuildRequires:	libgcrypt-devel > 1.1.90
 BuildRequires:	gnutls-devel
@@ -120,6 +119,9 @@ install -d -m 0755 %{buildroot}%{_localstatedir}/run/%{name}/
 %config(noreplace) %{_sysconfdir}/vpnc/vpnc-script
 
 %changelog
+* Fri Nov 15 2013 Paul Wouters <pwouters at redhat.com> - 0.5.3-20.svn457
+- Actually patch the vpnc-script we ship with the unbound patch
+
 * Mon Sep 23 2013 Paul Wouters <pwouters at redhat.com> - 0.5.3-19.svn457
 - Add support for dynamically reconfiguring unbound DNS (rhbz#865092)
 


More information about the scm-commits mailing list