diff options
author | Alberto Gonzalez Iniesta <agi@inittab.org> | 2011-12-13 11:04:22 +0100 |
---|---|---|
committer | Alberto Gonzalez Iniesta <agi@inittab.org> | 2012-02-21 15:53:41 +0100 |
commit | 3cedd1dd9877a0bae3e69d27c3d1a2fcd98787c0 (patch) | |
tree | a1af6e31567b9a7a992bc90d6106a7cfb0c67b37 /debian/patches/client_hang_when_server_dont_push.patch | |
parent | 349cfa7acb95abe865209a28e417ec74b56f9bba (diff) |
Imported Debian patch 2.2.1-1debian/2.2.1-1
Diffstat (limited to 'debian/patches/client_hang_when_server_dont_push.patch')
-rw-r--r-- | debian/patches/client_hang_when_server_dont_push.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/debian/patches/client_hang_when_server_dont_push.patch b/debian/patches/client_hang_when_server_dont_push.patch new file mode 100644 index 0000000..3e56613 --- /dev/null +++ b/debian/patches/client_hang_when_server_dont_push.patch @@ -0,0 +1,53 @@ +Description: When the client sends PUSH_REQUESTS, it waits until the server + sends PUSH_REPLY. If the server do not have anything to push to the client + nothing happens. The client will then regularly send new PUSH_REQUESTS until + it gets an answer, which results in not completing the connection negotiation. + This patch makes the server send an empty PUSH_REPLY when it has nothing + more to push to the client. +Author: David Sommerseth <dazo@users.sourceforge.net> +Origin: upstream, https://community.openvpn.net/openvpn/attachment/ticket/13/0001-Fixed-client-hang-when-server-don-t-PUSH-aka-the-NO_.patch +Bug: https://community.openvpn.net/openvpn/ticket/13 +Reviewed-By: James Yonan <james@openvpn.net> + +Index: openvpn-2.1.3/push.c +=================================================================== +--- openvpn-2.1.3.orig/push.c 2010-05-31 09:05:55.000000000 +0200 ++++ openvpn-2.1.3/push.c 2010-09-29 13:15:46.788461606 +0200 +@@ -177,6 +177,7 @@ + static char cmd[] = "PUSH_REPLY"; + const int extra = 64; /* extra space for possible trailing ifconfig and push-continuation */ + const int safe_cap = BCAP (&buf) - extra; ++ bool push_sent = false; + + buf_printf (&buf, cmd); + +@@ -192,6 +193,7 @@ + const bool status = send_control_channel_string (c, BSTR (&buf), D_PUSH); + if (!status) + goto fail; ++ push_sent = true; + multi_push = true; + buf_reset_len (&buf); + buf_printf (&buf, cmd); +@@ -218,6 +220,21 @@ + { + const bool status = send_control_channel_string (c, BSTR (&buf), D_PUSH); + if (!status) ++ goto fail; ++ push_sent = true; ++ } ++ ++ /* If nothing have been pushed, send an empty push, ++ * as the client is expecting a response ++ */ ++ if (!push_sent) ++ { ++ bool status = false; ++ ++ buf_reset_len (&buf); ++ buf_printf (&buf, cmd); ++ status = send_control_channel_string (c, BSTR(&buf), D_PUSH); ++ if (!status) + goto fail; + } + |