[patch] ipsec vpn sends empty tundev



hey,

   Attached is a patch for ipsec vpns, which sends iface (tundev) ip4
config parameter as empty string.  This patch , on top of checking iface
!= NULL, also checks for strlen (iface) != null.

  I am yet to send renamed ipsecvpn module (from novellvpn), will be
sending by next week.

suresh.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/NetworkManager/ChangeLog,v
retrieving revision 1.791
diff -u -r1.791 ChangeLog
--- ChangeLog	31 Jan 2006 19:16:57 -0000	1.791
+++ ChangeLog	1 Feb 2006 11:39:06 -0000
@@ -1,3 +1,10 @@
+2006-02-01  Sureshkumar T  <tsureshkumar novell com>
+
+	* src/vpn-manager/nm-vpn-connection.c (nm_vpn_connection_set_config): 
+	* src/NetworkManagerSystem.c
+	(nm_system_vpn_device_set_from_ip4_config): check for empty string
+	for iface
+
 2006-01-31  Dan Williams  <dcbw redhat com>
 
 	* nm-applet.desktop
Index: src/NetworkManagerSystem.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/src/NetworkManagerSystem.c,v
retrieving revision 1.32
diff -u -r1.32 NetworkManagerSystem.c
--- src/NetworkManagerSystem.c	26 Jan 2006 21:08:43 -0000	1.32
+++ src/NetworkManagerSystem.c	1 Feb 2006 11:39:06 -0000
@@ -273,7 +273,7 @@
 	if (active_device && (ad_config = nm_device_get_ip4_config (active_device)))
 		nm_system_device_set_ip4_route (active_device, nm_ip4_config_get_gateway (ad_config), nm_ip4_config_get_gateway (config), 0xFFFFFFFF);
 
-	if (iface != NULL)
+	if (iface != NULL && strlen (iface))
 	{
 		nm_system_device_set_up_down_with_iface (NULL, iface, TRUE);
 
Index: src/vpn-manager/nm-vpn-connection.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/src/vpn-manager/nm-vpn-connection.c,v
retrieving revision 1.5
diff -u -r1.5 nm-vpn-connection.c
--- src/vpn-manager/nm-vpn-connection.c	3 Jan 2006 20:58:07 -0000	1.5
+++ src/vpn-manager/nm-vpn-connection.c	1 Feb 2006 11:39:06 -0000
@@ -128,7 +128,7 @@
 	g_return_val_if_fail (ip4_config != NULL, FALSE);
 
 	/* IPsec VPNs will not have tunnel device */
-	if (vpn_iface != NULL)
+	if (vpn_iface != NULL && strlen (vpn_iface))
 		nm_vpn_connection_set_vpn_iface (connection, vpn_iface);
 	nm_vpn_connection_set_parent_device (connection, dev);
 	nm_vpn_connection_set_ip4_config (connection, ip4_config);


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