[patch] multiple machines in same network can't connect to VPN



To allow multiple connections to the same VPN concentrator, we need to use UDP Encapsulation. The attached patch is pretty straightforward.

May I commit the fix to CVS?


Index: vpn-daemons/vpnc/src/nm-vpnc-service.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/vpn-daemons/vpnc/src/nm-vpnc-service.c,v
retrieving revision 1.3
diff -d -u -p -r1.3 nm-vpnc-service.c
--- vpn-daemons/vpnc/src/nm-vpnc-service.c	13 Jul 2005 17:12:33 -0000	1.3
+++ vpn-daemons/vpnc/src/nm-vpnc-service.c	14 Aug 2005 05:49:47 -0000
@@ -55,6 +55,7 @@ static const char *vpnc_binary_paths[] =
 };
 
 #define NM_VPNC_HELPER_PATH		BINDIR"/nm-vpnc-service-vpnc-helper"
+#define NM_VPNC_UDP_ENCAPSULATION_PORT	0 /* random port */
 
 typedef struct NmVpncData
 {
@@ -428,6 +429,14 @@ static gboolean nm_vpnc_config_write (gu
 	x = write (vpnc_fd, string, strlen (string));
 	g_free (string);
 
+	string = g_strdup ("UDP Encapsulate\n");
+	x = write (vpnc_fd, string, strlen (string));
+	g_free (string);
+
+	string = g_strdup_printf ("UDP Encapsulation Port %s\n", NM_VPNC_UDP_ENCAPSULATION_PORT);
+	x = write (vpnc_fd, string, strlen (string));
+	g_free (string);
+
 	string = g_strdup_printf ("IPSec secret %s\n", password_items[0]);
 	x = write (vpnc_fd, string, strlen (string));
 	g_free (string);
@@ -483,6 +492,7 @@ static gboolean nm_vpnc_config_options_v
 					{ "IPSec secret",		OPT_TYPE_ASCII },
 					{ "Xauth username",		OPT_TYPE_ASCII },
 					{ "UDP Encapsulate",	OPT_TYPE_NONE },
+					{ "UDP Encapsulation Port",	OPT_TYPE_ASCII },
 					{ "Domain",			OPT_TYPE_ASCII },
 					{ "IKE DH Group",		OPT_TYPE_ASCII },
 					{ "Perfect Forward Secrecy", OPT_TYPE_ASCII },
Index: vpn-daemons/vpnc/ChangeLog
===================================================================
RCS file: /cvs/gnome/NetworkManager/vpn-daemons/vpnc/ChangeLog,v
retrieving revision 1.11
diff -d -u -p -r1.11 ChangeLog
--- vpn-daemons/vpnc/ChangeLog	12 Aug 2005 18:28:04 -0000	1.11
+++ vpn-daemons/vpnc/ChangeLog	14 Aug 2005 05:49:47 -0000
@@ -1,3 +1,8 @@
+2005-08-14  Christopher Aillon  <caillon redhat com>
+
+	* src/nm-vpn-service.c:  Use UDP Encapsulation, to allow
+	multiple VPN connections from the same network
+
 2005-08-12  Robert Love  <rml novell com>
 
 	* configure.in: add 'sv' translation


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]