Gert Doering has submitted this change. (
https://gerrit.openvpn.net/c/openvpn/+/2185?usp=email )
Change subject: tun: drop no-op IFF_ONE_QUEUE on Linux
......................................................................
tun: drop no-op IFF_ONE_QUEUE on Linux
The kernel ignores the flag since Linux 3.8, commit 5d097109257c ("tun:
only queue packets on device"). Also drop its guard around the
--txqueuelen code, since SIOCSIFTXQLEN is always available, and the
stale --tun-ipv6 comment.
Drop the outdated kernel version and init script note from INSTALL.
Change-Id: I272f840b547dde968ceca2c24de5a922f0721149
Signed-off-by: Razvan Cojocaru <[email protected]>
Acked-by: Gert Doering <[email protected]>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2185
Message-Id: <[email protected]>
URL:
https://www.mail-archive.com/[email protected]/msg41384.html
Signed-off-by: Gert Doering <[email protected]>
---
M INSTALL
M src/openvpn/tun.c
2 files changed, 3 insertions(+), 15 deletions(-)
diff --git a/INSTALL b/INSTALL
index d0ffaf0..0484e98 100644
--- a/INSTALL
+++ b/INSTALL
@@ -226,13 +226,10 @@
TUN/TAP Driver References:
-* Linux 2.6 or higher (with integrated TUN/TAP driver):
+* Linux (with integrated TUN/TAP driver):
- (1) load driver: modprobe tun
- (2) enable routing: echo 1 > /proc/sys/net/ipv4/ip_forward
-
- Note that (1) needs to be done once per reboot. If you install from RPM (see
- above) and use the openvpn.init script, these steps are taken care of for
you.
+ (1) load driver (only if /dev/net/tun is missing): modprobe tun
+ (2) enable routing: echo 1 > /proc/sys/net/ipv4/ip_forward
* FreeBSD:
diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c
index 70fdd7e..0ba8a4a 100644
--- a/src/openvpn/tun.c
+++ b/src/openvpn/tun.c
@@ -2123,16 +2123,9 @@
msg(M_ERR, "ERROR: Cannot open TUN/TAP dev %s", node);
}
- /*
- * Process --tun-ipv6
- */
CLEAR(ifr);
ifr.ifr_flags = IFF_NO_PI;
-#if defined(IFF_ONE_QUEUE) && defined(SIOCSIFTXQLEN)
- ifr.ifr_flags |= IFF_ONE_QUEUE;
-#endif
-
#ifdef IFF_BACKPRESSURE
ifr.ifr_flags |= IFF_BACKPRESSURE;
#endif
@@ -2175,7 +2168,6 @@
/*
* Try making the TX send queue bigger
*/
-#if defined(IFF_ONE_QUEUE) && defined(SIOCSIFTXQLEN)
if (tt->options.txqueuelen)
{
struct ifreq netifr;
@@ -2201,7 +2193,6 @@
msg(M_WARN | M_ERRNO, "Note: Cannot open control socket on
%s", ifr.ifr_name);
}
}
-#endif /* if defined(IFF_ONE_QUEUE) && defined(SIOCSIFTXQLEN) */
set_nonblock(tt->fd);
set_cloexec(tt->fd);
--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/2185?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I272f840b547dde968ceca2c24de5a922f0721149
Gerrit-Change-Number: 2185
Gerrit-PatchSet: 2
Gerrit-Owner: Răzvan Cojocaru <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-Reviewer: Gert Doering <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel