Commit 90489e9d authored by Michael's avatar Michael Committed by Thomas Haller

service: force the use of tcp-client protocol option instead of tcp

Since there is case where using "proto tcp" is ambiguous, it
is better to always use tcp-client to be sure.

https://bugzilla.gnome.org/show_bug.cgi?id=759811
https://bugzilla.redhat.com/show_bug.cgi?id=1288711
(cherry picked from commit 03ad88a8)
parent e547321c
......@@ -1034,8 +1034,10 @@ nm_openvpn_start_openvpn_binary (NMOpenvpnPlugin *plugin,
add_openvpn_arg (args, "1194"); /* default IANA port */
if (proto) {
if (!strcmp (proto, "udp") || !strcmp (proto, "tcp"))
add_openvpn_arg (args, proto);
if (!strcmp (proto, "udp"))
add_openvpn_arg (args, proto);
else if (!strcmp (proto, "tcp"))
add_openvpn_arg (args, "tcp-client");
else {
g_set_error (error,
NM_VPN_PLUGIN_ERROR,
......@@ -1046,7 +1048,7 @@ nm_openvpn_start_openvpn_binary (NMOpenvpnPlugin *plugin,
return FALSE;
}
} else if (proto_tcp && !strcmp (proto_tcp, "yes"))
add_openvpn_arg (args, "tcp");
add_openvpn_arg (args, "tcp-client");
else
add_openvpn_arg (args, "udp");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment