summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Yonan <james@openvpn.net>2011-04-03 23:48:15 +0200
committerDavid Sommerseth <davids@redhat.com>2011-04-14 17:01:43 +0200
commitc7dd80cf45efa935f01a233aa74050fb5898adb8 (patch)
tree6125037417e0f6d5de3d0d6f9174b965fd4bc2d3
parent89e0728ba6057bfe45b635a42c36502e9edc8cb3 (diff)
downloadopenvpn-c7dd80cf45efa935f01a233aa74050fb5898adb8.tar.gz
openvpn-c7dd80cf45efa935f01a233aa74050fb5898adb8.tar.xz
openvpn-c7dd80cf45efa935f01a233aa74050fb5898adb8.zip
Fixed bug in port-share that could cause port share process to crash
with output like this: TCP connection established with 85.190.0.3:41781 85.190.0.3:41781 SIGTERM[soft,port-share-redirect] received, client-instance exiting MANAGEMENT: TCP recv error: Socket operation on non-socket MANAGEMENT: Client disconnected MANAGEMENT: Triggering management exit Exiting due to fatal error EVENT: epoll_ctl EPOLL_CTL_MOD failed, sd=6: Bad file descriptor (errno=9) Then an error like this for every incoming connection that should be proxied: 76.120.71.74:55302 PORT SHARE: sendmsg failed -- unable to communicate with background process (6,8,-1,-1): Connection refused (errno=111) Version 2.1.3s (cherry picked from commit 9ed122efe870288ea75ee62a4eae2373a655145b)
-rw-r--r--ps.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ps.c b/ps.c
index 9b9723c..ef48e36 100644
--- a/ps.c
+++ b/ps.c
@@ -774,6 +774,9 @@ port_share_open (const char *host, const int port)
/* Let msg know that we forked */
msg_forked ();
+ /* Don't interact with management interface */
+ management = NULL;
+
/* close all parent fds except our socket back to parent */
close_fds_except (fd[1]);