Make options.c only set xmit_hold when port_share is active to least
document this dependency. I have not actually tested if this dependency
is actually true (or if port_share could work without xmit_hold).

Signed-off-by: Arne Schwabe <a...@rfc2549.org>
---
 src/openvpn/init.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/openvpn/init.c b/src/openvpn/init.c
index 034edba0..fdd9a6cc 100644
--- a/src/openvpn/init.c
+++ b/src/openvpn/init.c
@@ -2908,12 +2908,15 @@ do_init_crypto_tls(struct context *c, const unsigned 
int flags)
         to.push_peer_info_detail = 0;
     }
 
+#ifdef ENABLE_PORT_SHARE
     /* should we not xmit any packets until we get an initial
      * response from client? */
-    if (to.server && options->ce.proto == PROTO_TCP_SERVER)
+    if (to.server && options->ce.proto == PROTO_TCP_SERVER
+        && options->port_share_host)
     {
         to.xmit_hold = true;
     }
+#endif
 
     to.disable_occ = !options->occ;
 
-- 
2.26.2



_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to