]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
tun.h: remove TUN_PASS_BUFFER define
authorLev Stipakov <lstipakov@gmail.com>
Mon, 9 Sep 2019 08:57:16 +0000 (11:57 +0300)
committerGert Doering <gert@greenie.muc.de>
Wed, 18 Sep 2019 13:09:07 +0000 (15:09 +0200)
Since the very beginning this define has only
been used together with _WIN32 and code wrapped into it
uses Win32 API, so it could be safely removed and
replaced with _WIN32.

Signed-off-by: Lev Stipakov <lstipakov@gmail.com>
Acked-by: David Sommerseth <davids@openvpn.net>
Message-Id: <1568019436-28527-1-git-send-email-lstipakov@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg18808.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/forward.c
src/openvpn/tun.h

index c2dcb538bef8afa0b8b6def8e1ff23205e32a531..8451706be461b15b250442751e0ad75f76389b87 100644 (file)
@@ -1256,7 +1256,7 @@ read_incoming_tun(struct context *c)
     perf_push(PERF_READ_IN_TUN);
 
     c->c2.buf = c->c2.buffers->read_tun_buf;
-#ifdef TUN_PASS_BUFFER
+#ifdef _WIN32
     read_tun_buffered(c->c1.tuntap, &c->c2.buf);
 #else
     ASSERT(buf_init(&c->c2.buf, FRAME_HEADROOM(&c->c2.frame)));
@@ -1877,7 +1877,7 @@ process_outgoing_tun(struct context *c)
                                 &c->c2.n_trunc_tun_write);
 #endif
 
-#ifdef TUN_PASS_BUFFER
+#ifdef _WIN32
         size = write_tun_buffered(c->c1.tuntap, &c->c2.to_tun);
 #else
         size = write_tun(c->c1.tuntap, BPTR(&c->c2.to_tun), BLEN(&c->c2.to_tun));
index 475643ac9176fc357c5f88b5f3b5470616a723b2..5a0a9331f28d0a3c07140eb204abac886ef82d1c 100644 (file)
@@ -336,8 +336,6 @@ route_order(void)
 
 #ifdef _WIN32
 
-#define TUN_PASS_BUFFER
-
 struct tap_reg
 {
     const char *guid;