** Changed in: network-manager-openvpn (Ubuntu)
       Status: In Progress => Triaged

** Patch removed: "Proposed upstream fix"
   
https://bugs.launchpad.net/ubuntu/+source/network-manager-openvpn/+bug/1252832/+attachment/3912904/+files/lp1252832.diff

** Description changed:

  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 (src/nm-openvpn-
- service.c::nm_openvpn_start_openvpn_binary()):
- 
-     tmp = nm_setting_vpn_get_data_item (s_vpn, NM_OPENVPN_KEY_REMOTE);
-     if (tmp && strlen (tmp)) {
-         char *tok;
-         while ((tok = strsep((char**)&tmp, " ,")) != NULL) {
-             if (strlen(tok)) {
-                 add_openvpn_arg (args, "--remote");
-                 add_openvpn_arg (args, tok);
-             }
-         }
-     }
- 
- So the following entry in the Gateway text-box "a.b.c.d 1194 udp,
- e.f.g.h 443 tcp"
+ 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.
  
- the fix is to remove the space from the strsep() match string.
+ Upstream reworked the gateway entry in master commit 2014-07-11
+ cb81bdce.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1252832

Title:
  Multiple remote gateways fail due to incorrect parsing

To manage notifications about this bug go to:
https://bugs.launchpad.net/network-manager-openvpn/+bug/1252832/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to