Multiple remote gateways fail due to incorrect parsing

Bug #1252832 reported by TJ
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
NetworkManager-OpenVPN
Fix Released
Medium
network-manager-openvpn (Ubuntu)
Triaged
Medium
TJ

Bug Description

Up to and including 13.10 and 14.04 there is a bug in the parsing of multiple remote gateway specifications.

The tooltip says:

po/id.po:402:msgid "Remote host name or IP address. You can specify multiple items for redundancy (use commas to separate the entries).
config: remote"

But the code separates on spaces as well as commas so the following entry in the Gateway text-box "a.b.c.d 1194 udp, e.f.g.h 443 tcp"

which is stored in /etc/NetworkManager/system-connections/server as:

 remote=a.b.c.d 1194 udp, e.f.g.h 443 tcp

results in trying to start the process using this:

/usr/sbin/openvpn --remote a.b.c.d --remote 1194 --remote udp --remote e.f.g.h --remote 443 --remote tcp --comp-lzo --nobind --dev tun --proto udp --port 1194 ...

which fails miserably.

Upstream reworked the gateway entry in master commit 2014-07-11 cb81bdce.

Tags: patch

Related branches

Revision history for this message
TJ (tj) wrote :

After applying the fix the resulting process command-line is:

/usr/sbin/openvpn --remote a.b.c.d 1194 udp --remote e.f.g.h 443 tcp --comp-lzo --nobind --dev tun --proto udp --port 1194 ...

and the connection is successful.

I'm posting this upstream and will report back once a patch has been applied.

Changed in network-manager-openvpn (Ubuntu):
status: New → In Progress
assignee: nobody → TJ (tj)
importance: Undecided → Medium
TJ (tj)
description: updated
Changed in network-manager-openvpn:
importance: Unknown → Medium
status: Unknown → New
Revision history for this message
TJ (tj) wrote :

Gnome bugs 712710 and 712720 cover this issue and reference proposed fixes.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Proposed upstream fix" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Changed in network-manager-openvpn:
status: New → In Progress
Changed in network-manager-openvpn:
status: In Progress → Fix Released
Revision history for this message
TJ (tj) wrote :

A new upstream network-manager-openvpn commit contains a reworking of the multiple gateways functionality:

c55ba4e 2014-07-11 core/ui: allow specifying port and protocol for gateways (bgo #712710)

This should be cherry-picked since it is not part of an upstream release and is unlikely to be included in Utopic, and thus can't be simply back-ported.

TJ (tj)
Changed in network-manager-openvpn (Ubuntu):
status: In Progress → Triaged
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.