summaryrefslogtreecommitdiff
path: root/src/openvpn/mudp.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2021-11-29 20:51:58 +0100
committerJörg Frings-Fürst <debian@jff.email>2021-11-29 20:51:58 +0100
commit6e3e95a9da9458ddf0874b4bd1c8ce6b47fcef27 (patch)
tree6e3667709d99f857d90b9831426f6a32ee70d113 /src/openvpn/mudp.c
parentb29f419d68b26b75a44e3ac00748875f1003b900 (diff)
parentf2b3dda12a731c2e0971cb7889728edaf23f6cb0 (diff)
Merge branch 'upstream' into develop
Diffstat (limited to 'src/openvpn/mudp.c')
-rw-r--r--src/openvpn/mudp.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/openvpn/mudp.c b/src/openvpn/mudp.c
index 4f63654..d5459f8 100644
--- a/src/openvpn/mudp.c
+++ b/src/openvpn/mudp.c
@@ -5,7 +5,7 @@
* packet encryption, packet authentication, and
* packet compression.
*
- * Copyright (C) 2002-2018 OpenVPN Inc <sales@openvpn.net>
+ * Copyright (C) 2002-2021 OpenVPN Inc <sales@openvpn.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
@@ -29,11 +29,9 @@
#include "syshead.h"
-#if P2MP_SERVER
-
#include "multi.h"
#include <inttypes.h>
-#include "forward-inline.h"
+#include "forward.h"
#include "memdbg.h"
@@ -278,7 +276,12 @@ p2mp_iow_flags(const struct multi_context *m)
{
flags |= IOW_READ;
}
-
+#ifdef _WIN32
+ if (tuntap_ring_empty(m->top.c1.tuntap))
+ {
+ flags &= ~IOW_READ_TUN;
+ }
+#endif
return flags;
}
@@ -379,4 +382,3 @@ tunnel_server_udp(struct context *top)
tunnel_server_udp_single_threaded(top);
}
-#endif /* if P2MP_SERVER */