Bug 485345 - Cannot export VPN connection
Summary: Cannot export VPN connection
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: NetworkManager
Version: 5.3
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Dan Williams
QA Contact: desktop-bugs@redhat.com
URL:
Whiteboard:
Depends On: 480496
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-02-12 23:54 UTC by Dan Williams
Modified: 2009-09-02 11:54 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
NetworkManager did not export VPN configurations. When a user selected this function, NetworkManager would present an error message: "VPN setting invalid", even for a connection with valid settings. Network manager now exports VPN connections correctly.
Clone Of: 480496
Environment:
Last Closed: 2009-09-02 11:54:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:1389 0 normal SHIPPED_LIVE NetworkManager bug fix update 2009-09-01 11:58:21 UTC

Description Dan Williams 2009-02-12 23:54:24 UTC
+++ This bug was initially created as a clone of Bug #480496 +++

Description of problem:
When I try and export a working VPN configuration, I get an error message


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Right click on NM applet
2. select "Edit Connections ..." menu item
3. select "VPN" tab
4. select a working VPN configuration
5. click "Export"
6. Select a file location
7. Click "Save"
  
Actual results:
 Error box with:

    Cannot export VPN connection

    The VPN connection '<snip>' could not be exported to <snip> (openvpn).conf.

    Error: VPN setting invalid.

Expected results:
New file <snip> (openvpn).conf with working open VPN settings


Additional info:

--- Additional comment from anthony.seward on 2009-01-17 13:56:14 EDT ---

There appears to be an upstream bug for this: http://bugzilla.gnome.org/show_bug.cgi?id=551939

--- Additional comment from mnowak on 2009-01-25 07:47:03 EDT ---

I can confirm it. I thought it happens due to warnings like

** (nm-connection-editor:9182): WARNING **: Invalid setting VPN: IPSec gateway

** (nm-connection-editor:9182): WARNING **: Invalid setting VPN: IPSec ID
[...]

but it happens for nearly blank Cisco VPN setting too.

Comment 1 Dan Williams 2009-02-12 23:58:25 UTC
Fix below; upstream SVN revisions 1156 (trunk) and 1157 (stable 0.7).  Low risk.

Index: src/connection-editor/vpn-helpers.c
===================================================================
--- src/connection-editor/vpn-helpers.c	(revision 1155)
+++ src/connection-editor/vpn-helpers.c	(working copy)
@@ -326,10 +326,10 @@ export_vpn_to_file_cb (GtkWidget *dialog
 		goto done;
 	}
 
-	s_vpn = NM_SETTING_VPN (nm_connection_get_setting (connection, NM_TYPE_SETTING_VPN));
+	s_vpn = (NMSettingVPN *) nm_connection_get_setting (connection, NM_TYPE_SETTING_VPN);
 	service_type = s_vpn ? nm_setting_vpn_get_service_type (s_vpn) : NULL;
 
-	if (service_type) {
+	if (!service_type) {
 		g_set_error (&error, 0, 0, "VPN setting invalid");
 		goto done;
 	}

Comment 5 Dan Williams 2009-05-04 16:26:48 UTC
nm-connection-editor-vpn-export-rh485345.patch

Comment 7 Ruediger Landmann 2009-05-25 02:03:28 UTC
Release note added. If any revisions are required, please set the 
"requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly.
All revisions will be proofread by the Engineering Content Services team.

New Contents:
NetworkManager did not export VPN configurations. When a user selected this function, NetworkManager would present an error message: "VPN setting invalid", even for a connection with valid settings. Network manager now exports VPN connections correctly.

Comment 8 Zack Cerza 2009-06-15 17:06:36 UTC
Verified on NetworkManager-0.7.0-7.el5.{i386,x86_64}.

Comment 10 errata-xmlrpc 2009-09-02 11:54:14 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-1389.html


Note You need to log in before you can comment on or make changes to this bug.