This commit is contained in:
Avesh Agarwal 2012-12-13 15:12:30 -05:00
parent d21efff2a3
commit 11540ab009
2 changed files with 46 additions and 1 deletions

View File

@ -7,7 +7,7 @@
Summary: NetworkManager VPN plug-in for openswan
Name: NetworkManager-openswan
Version: 0.9.3.995
Release: 3%{snapshot}%{?dist}
Release: 4%{snapshot}%{?dist}
License: GPLv2+
Group: System Environment/Base
URL: http://ftp.gnome.org/pub/GNOME/sources/NetworkManager-openswan/0.9/
@ -15,6 +15,7 @@ Source0: http://ftp.gnome.org/pub/GNOME/sources/NetworkManager-openswan/0.9/%
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Patch1: nm-openswan-changes.patch
Patch2: nm-openswan-845599-865883.patch
BuildRequires: gtk3-devel
BuildRequires: dbus-devel
@ -39,6 +40,7 @@ with NetworkManager and the GNOME desktop
%setup -q -n NetworkManager-openswan-%{realversion}
%patch1 -p1
%patch2 -p1
%build
%configure --disable-static --enable-more-warnings=yes
@ -72,6 +74,9 @@ rm -rf $RPM_BUILD_ROOT
%dir %{_datadir}/gnome-vpn-properties/openswan
%changelog
* Thu Dec 13 2012 Avesh Agarwal <avagarwa@redhat.com> - 0.9.3.995-4
Resolves: #845599, #865883
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.3.995-3.git20120302
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

View File

@ -0,0 +1,40 @@
diff -urNp NetworkManager-openswan-0.9.3.995-patched/src/nm-openswan-service.h NetworkManager-openswan-0.9.3.995-current/src/nm-openswan-service.h
--- NetworkManager-openswan-0.9.3.995-patched/src/nm-openswan-service.h 2012-10-18 12:46:37.007411996 -0400
+++ NetworkManager-openswan-0.9.3.995-current/src/nm-openswan-service.h 2012-12-13 14:59:40.872675723 -0500
@@ -54,6 +54,10 @@
#define NM_OPENSWAN_PW_TYPE_ASK "ask"
#define NM_OPENSWAN_PW_TYPE_UNUSED "unused"
+#ifndef NM_VPN_PLUGIN_IP4_CONFIG_TUNDEV_NONE
+#define NM_VPN_PLUGIN_IP4_CONFIG_TUNDEV_NONE "_none_"
+#endif
+
typedef struct {
NMVPNPlugin parent;
} NMOPENSWANPlugin;
diff -urNp NetworkManager-openswan-0.9.3.995-patched/src/nm-openswan-service-helper.c NetworkManager-openswan-0.9.3.995-current/src/nm-openswan-service-helper.c
--- NetworkManager-openswan-0.9.3.995-patched/src/nm-openswan-service-helper.c 2012-10-18 12:46:49.758445398 -0400
+++ NetworkManager-openswan-0.9.3.995-current/src/nm-openswan-service-helper.c 2012-12-13 14:59:07.560696232 -0500
@@ -266,13 +266,15 @@ main (int argc, char *argv[])
else
helper_failed (connection, "Openswan Pluto Right Peer (VPN Gateway)");
- /* Tunnel device */
- //val = str_to_gvalue (getenv ("TUNDEV"), FALSE);
- val = str_to_gvalue ("tun0", FALSE);
- if (val)
- g_hash_table_insert (config, NM_VPN_PLUGIN_IP4_CONFIG_TUNDEV, val);
- else
- helper_failed (connection, "Tunnel Device");
+ /*
+ * Tunnel device
+ * Indicate that openswan plugin doesn't use tun/tap device
+ */
+ val = g_slice_new0 (GValue);
+ g_value_init (val, G_TYPE_STRING);
+ g_value_set_string (val, NM_VPN_PLUGIN_IP4_CONFIG_TUNDEV_NONE);
+ g_hash_table_insert (config, NM_VPN_PLUGIN_IP4_CONFIG_TUNDEV, val);
+
/* IP address */
val = addr_to_gvalue (getenv ("PLUTO_MY_SOURCEIP"));