Bug 485345 - Cannot export VPN connection
Cannot export VPN connection
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: NetworkManager (Show other bugs)
5.3
All Linux
low Severity medium
: rc
: ---
Assigned To: Dan Williams
desktop-bugs@redhat.com
:
Depends On: 480496
Blocks:
  Show dependency treegraph
 
Reported: 2009-02-12 18:54 EST by Dan Williams
Modified: 2009-09-02 07:54 EDT (History)
5 users (show)

See Also:
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.
Story Points: ---
Clone Of: 480496
Environment:
Last Closed: 2009-09-02 07:54:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dan Williams 2009-02-12 18:54:24 EST
+++ 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@ieee.org 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@redhat.com 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 18:58:25 EST
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 12:26:48 EDT
nm-connection-editor-vpn-export-rh485345.patch
Comment 7 Ruediger Landmann 2009-05-24 22:03:28 EDT
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 13:06:36 EDT
Verified on NetworkManager-0.7.0-7.el5.{i386,x86_64}.
Comment 10 errata-xmlrpc 2009-09-02 07:54:14 EDT
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.