[network-manager-openvpn] service: force the use of tcp-client protocol option instead of tcp
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openvpn] service: force the use of tcp-client protocol option instead of tcp
- Date: Mon, 11 Jan 2016 12:57:47 +0000 (UTC)
commit 03ad88a8678f2204784ba38dfe60c6f8410a9ffe
Author: Michael Scherer <misc zarb org>
Date: Sun Dec 13 14:48:32 2015 +0100
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
src/nm-openvpn-service.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/nm-openvpn-service.c b/src/nm-openvpn-service.c
index 087be14..6b6229d 100644
--- a/src/nm-openvpn-service.c
+++ b/src/nm-openvpn-service.c
@@ -1023,8 +1023,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,
@@ -1035,7 +1037,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");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]