two small openvpn fixes



Can we get the attached two patches applied? One fixes an off by one bug in parsing the dns servers (only accepting cases where more than one dns server is listed on a single line). The other passes the --route-noexec option to openvpn to ensure that it doesn't mess with routing.

With these two fixes, it might be reasonable to get an update pushed for Fedora 8 (not sure where other things stand of course).


Outstanding issues:

1) As I mentioned in a previous e-mail, we need some way to pass a vpn gateway back to NM, in addition to the IP_CONFIG_GATEWAY.

2) We need some way to pass a list of routes from the vpn helper back to NM.

3) There still are some crashes working with VPN settings in svn 3149, with vpnc as well as openvpn. I believe the crashes are occurring when GHashTable is trying to free elements when they are removed or replaced.

I have an idea for #1-2, but I'll post that in a separate message for discussion.


-casey
Index: vpn-daemons/openvpn/src/nm-openvpn-service-openvpn-helper.c
===================================================================
--- vpn-daemons/openvpn/src/nm-openvpn-service-openvpn-helper.c	(revision 3149)
+++ vpn-daemons/openvpn/src/nm-openvpn-service-openvpn-helper.c	(working copy)
@@ -166,7 +166,7 @@
 
 	g_strfreev (split);
 
-	if (!value_array && array->len > 1) {
+	if (!value_array && array->len > 0) {
 		value_array = g_slice_new0 (GValue);
 		g_value_init (value_array, DBUS_TYPE_G_UINT_ARRAY);
 		g_value_set_boxed (value_array, array);
Index: vpn-daemons/openvpn/src/nm-openvpn-service.c
===================================================================
--- vpn-daemons/openvpn/src/nm-openvpn-service.c	(revision 3149)
+++ vpn-daemons/openvpn/src/nm-openvpn-service.c	(working copy)
@@ -462,6 +462,9 @@
 	/* Query on the management socket for user/pass */
 	g_ptr_array_add (openvpn_argv, (gpointer) "--management-query-passwords");
 
+	/* do not let openvpn setup routes, NM will handle it */
+	g_ptr_array_add (openvpn_argv, (gpointer) "--route-noexec");
+
 	/* Now append configuration options which are dependent on the configuration type */
 	switch (connection_type) {
 	case NM_OPENVPN_CONTYPE_X509:


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