Arne Schwabe has uploaded this change for review. ( 
https://gerrit.openvpn.net/c/openvpn/+/2067?usp=email )


Change subject: Do not hash real addresses of TCP connection
......................................................................

Do not hash real addresses of TCP connection

With neither status report nor max-client depending on TCP
connections in m->hash anymore, remove hashing of TCP
connection.

This now allows an obscure corner case of two TCP clients coming
from the same IP and port to different IP or port on the server
but as our operating system can handle this case, we do not have
a problem with that either.

This has a small added benefit to keep the number of entries in
m->hash a bit smaller.

Change-Id: If8ae9cbc971f60800a998abf2f97da0384c023f3
Signed-off-by: Arne Schwabe <[email protected]>
---
M src/openvpn/multi.c
1 file changed, 9 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/67/2067/1

diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c
index 055305d..98172db 100644
--- a/src/openvpn/multi.c
+++ b/src/openvpn/multi.c
@@ -2487,6 +2487,15 @@
 multi_client_connect_real_addr(struct multi_context *m, struct multi_instance 
*mi,
                                bool deferred, uint64_t *option_types_found)
 {
+    if (proto_is_tcp(mi->real.proto))
+    {
+        /* For TCP connection we neither need to be able to map incoming
+         * DATA_V1 packets to the multi_instance nor do we need to ensure
+         * that two TCP connections are not using the same address as the
+         * OS takes care of that. */
+        return CC_RET_SUCCEEDED;
+    }
+
     /* If the address is already taken up by another client we fail the new
      * connection */
     if (!multi_check_dest_addr_allowed(m, mi, &mi->real))

--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/2067?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: If8ae9cbc971f60800a998abf2f97da0384c023f3
Gerrit-Change-Number: 2067
Gerrit-PatchSet: 1
Gerrit-Owner: Arne Schwabe <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to