Package: openvpn Severity: normal Version: 2.1.0-2 Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu ubuntu-patch maverick
Starting with OpenVPN 2.1~rc20, if the server does not push any option to the client, the client connection hangs while waiting for an answer to its PUSH_REQUEST: https://bugs.launchpad.net/ubuntu/+source/openvpn/+bug/579737 Proposed patch is taken from upstream bug at: https://community.openvpn.net/openvpn/ticket/13 Hope this helps, -- Thierry Carrez
diff -Nru openvpn-2.1.0/debian/patches/client_hang_when_server_dont_push.patch openvpn-2.1.0/debian/patches/client_hang_when_server_dont_push.patch --- openvpn-2.1.0/debian/patches/client_hang_when_server_dont_push.patch 1970-01-01 01:00:00.000000000 +0100 +++ openvpn-2.1.0/debian/patches/client_hang_when_server_dont_push.patch 2010-06-28 11:04:51.000000000 +0200 @@ -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 <d...@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 <ja...@openvpn.net> + +Index: openvpn/push.c +=================================================================== +--- openvpn.orig/push.c 2010-06-28 11:02:21.697220261 +0200 ++++ openvpn/push.c 2010-06-28 11:02:24.247222587 +0200 +@@ -176,6 +176,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); + +@@ -191,6 +192,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); +@@ -217,6 +219,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; + } + diff -Nru openvpn-2.1.0/debian/patches/series openvpn-2.1.0/debian/patches/series --- openvpn-2.1.0/debian/patches/series 2010-05-05 04:06:18.000000000 +0200 +++ openvpn-2.1.0/debian/patches/series 2010-06-28 11:02:17.000000000 +0200 @@ -9,3 +9,4 @@ eurephia.patch counter_type_for_bytes.patch route_default_nil.patch +client_hang_when_server_dont_push.patch