[Patch] openvpn with TCP
- From: Tambet Ingo <tambet ximian com>
- To: networkmanager-list gnome org
- Subject: [Patch] openvpn with TCP
- Date: Mon, 02 Oct 2006 15:14:54 +0300
Hey,
Here's a patch to make openvpn work with TCP port. NM uses --proto tcp
which, according to the manual page (and a bug #190940 in bnc), isn't
correct.
Tambet
Index: openvpn/properties/nm-openvpn.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/vpn-daemons/openvpn/properties/nm-openvpn.c,v
retrieving revision 1.4.2.3
diff -u -r1.4.2.3 nm-openvpn.c
--- openvpn/properties/nm-openvpn.c 27 Sep 2006 15:10:23 -0000 1.4.2.3
+++ openvpn/properties/nm-openvpn.c 2 Oct 2006 12:10:59 -0000
@@ -225,7 +225,7 @@
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (impl->w_use_tap), TRUE);
should_expand = TRUE;
} else if ( (strcmp (key, "proto") == 0) &&
- (strcmp (value, "tcp") == 0) ) {
+ (strcmp (value, "tcp-client") == 0) ) {
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (impl->w_use_tcp), TRUE);
should_expand = TRUE;
} else if (strcmp (key, "cipher") == 0) {
@@ -328,7 +328,7 @@
data = g_slist_append (data, g_strdup ("remote"));
data = g_slist_append (data, g_strdup (remote));
data = g_slist_append (data, g_strdup ("proto"));
- data = g_slist_append (data, use_tcp ? g_strdup ("tcp") : g_strdup("udp"));
+ data = g_slist_append (data, use_tcp ? g_strdup ("tcp-client") : g_strdup("udp"));
data = g_slist_append (data, g_strdup ("ca"));
data = g_slist_append (data, g_strdup (ca));
data = g_slist_append (data, g_strdup ("cert"));
@@ -980,7 +980,7 @@
should_expand = TRUE;
}
- if ( strcmp (proto, "tcp") == 0 ) {
+ if ( strcmp (proto, "tcp-client") == 0 ) {
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (impl->w_use_tcp), TRUE);
should_expand = TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]