Attention is currently required from: Arne Schwabe.

Hello Arne Schwabe,

I'd like you to do a code review.
Please visit

    https://gerrit.openvpn.net/c/openvpn/+/2114?usp=email

to review the following change.


Change subject: openvpnserv: don't stop if the next pipe instance cannot be 
created
......................................................................

openvpnserv: don't stop if the next pipe instance cannot be created

If creating the next client pipe instance failed, the service stopped.

Drop the client and keep listening on the current instance instead.
Handing it to a worker would leave no instance to listen on.

Change-Id: Ib65ceb898d23777663c32241156d597918a24ffb
Signed-off-by: Heiko Hund <[email protected]>
---
M src/openvpnserv/interactive.c
1 file changed, 10 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/14/2114/1

diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c
index bffc9da..37e8667 100644
--- a/src/openvpnserv/interactive.c
+++ b/src/openvpnserv/interactive.c
@@ -4087,6 +4087,16 @@
         {
             /* Client connected, spawn a worker thread for it */
             HANDLE next_pipe = CreateClientPipeInstance();
+            if (next_pipe == INVALID_HANDLE_VALUE)
+            {
+                /*
+                 * Drop the client and keep listening on this instance. Handing
+                 * it over would leave no instance to listen on.
+                 */
+                DisconnectNamedPipe(pipe);
+                ResetOverlapped(&overlapped);
+                continue;
+            }

             /* Avoid exceeding WaitForMultipleObjects MAXIMUM_WAIT_OBJECTS */
             if (handle_count + 1 > MAXIMUM_WAIT_OBJECTS)

--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/2114?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ib65ceb898d23777663c32241156d597918a24ffb
Gerrit-Change-Number: 2114
Gerrit-PatchSet: 1
Gerrit-Owner: Heiko Hund <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: Arne Schwabe <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to