diff -u openvpn-2.1.0/debian/changelog openvpn-2.1.0/debian/changelog --- openvpn-2.1.0/debian/changelog +++ openvpn-2.1.0/debian/changelog @@ -1,3 +1,10 @@ +openvpn (2.1.0-1ubuntu1.1) lucid-proposed; urgency=low + + * debian/patches/client_hang_when_server_dont_push.patch: Fix client hanging + on PUSH_REQUEST when server does not push any option (LP: #579737) + + -- Chuck Short Fri, 16 Jul 2010 13:46:18 -0400 + openvpn (2.1.0-1ubuntu1) lucid; urgency=low * Merge from debian testing (LP: #509078), remaining changes: diff -u openvpn-2.1.0/debian/patches/series openvpn-2.1.0/debian/patches/series --- openvpn-2.1.0/debian/patches/series +++ openvpn-2.1.0/debian/patches/series @@ -9,0 +10 @@ +client_hang_when_server_dont_push.patch only in patch2: unchanged: --- openvpn-2.1.0.orig/debian/patches/client_hang_when_server_dont_push.patch +++ openvpn-2.1.0/debian/patches/client_hang_when_server_dont_push.patch @@ -0,0 +1,41 @@ +diff -Naurp openvpn-2.1.0.orig/push.c openvpn-2.1.0/push.c +--- openvpn-2.1.0.orig/push.c 2009-10-01 15:35:38.000000000 -0400 ++++ openvpn-2.1.0/push.c 2010-07-16 13:44:24.937532919 -0400 +@@ -176,6 +176,7 @@ send_push_reply (struct context *c) + 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 @@ send_push_reply (struct context *c) + 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 @@ send_push_reply (struct context *c) + { + 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; + } +