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

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.
(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,
......@@ -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");
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