patch to windows tap driver
Hi,
I received a bugfix for my IPv6 patch to the Windows TAP driver today, which affects IPv4 - and there is this open bug with small-size IPv4 packets in our trac, which this should fix...
The problem is a missing "break" statement at the end of the IPv6 block, which now leads to "fall into IPv6 block" and that one has a larger minimum packet size...
ACK from me - David, could you please integrate the one-line patch, and then we need James to compile + sign a new driver (and I think this warrants a 2.2 bugfix release).
[I'm not on IRC these days as I'm technically on vacation, but I saw this mail today and it warrants action]
gert
----- Forwarded message from Christian Niessner <[email protected]...> -----
@@ -1611,6 +1766,27 @@ AdapterTransmit (IN NDIS_HANDLE p_AdapterContext,
// Packet looks like IPv4, queue it.
l_PacketBuffer->m_SizeFlags |= TP_TUN;
+
+ case ETH_P_IPV6:
+ // make sure that packet is large
+ // enough to be IPv6
+ if (l_PacketLength+ < ETHERNET_HEADER_SIZE + IPV6_HEADER_SIZE)
+ goto no_queue;
+
[..]
tapdrvr.c 2011-11-10 09:24:24.000000000 +0100 renamed from tap-win32-latest/tapdrvr.c 2011-11-09 17:12:19.000000000 +0100 +1 -0
@@ -1766,6 +1766,7 @@ // Packet looks like IPv4, queue it. l_PacketBuffer->m_SizeFlags |= TP_TUN; + break; case ETH_P_IPV6: // make sure that packet is large
----- End forwarded message -----
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...Gert Doering
Acked-byHi,
as per David's request, a properly git-format-patch formatted patch attached below.
(The bug and fix are *so* obvious if you know where to look)
gert
Quoted 69 lines · Gert Doering
Hi,
I received a bugfix for my IPv6 patch to the Windows TAP driver today, which affects IPv4 - and there is this open bug with small-size IPv4 packets in our trac, which this should fix...
The problem is a missing "break" statement at the end of the IPv6 block, which now leads to "fall into IPv6 block" and that one has a larger minimum packet size...
ACK from me - David, could you please integrate the one-line patch, and then we need James to compile + sign a new driver (and I think this warrants a 2.2 bugfix release).
[I'm not on IRC these days as I'm technically on vacation, but I saw this mail today and it warrants action]
gert
----- Forwarded message from Christian Niessner <[email protected]...> -----
(quoted diff) +8
-0@@ -1611,6 +1766,27 @@ AdapterTransmit (IN NDIS_HANDLE p_AdapterContext, // Packet looks like IPv4, queue it. l_PacketBuffer->m_SizeFlags |= TP_TUN; + + case ETH_P_IPV6: + // make sure that packet is large + // enough to be IPv6 + if (l_PacketLength + < ETHERNET_HEADER_SIZE + IPV6_HEADER_SIZE) + goto no_queue; +tapdrvr.c 2011-11-10 09:24:24.000000000 +0100 renamed from tap-win32-latest/tapdrvr.c 2011-11-09 17:12:19.000000000 +0100 +1
-1@@ -1766,6 +1766,7 @@ // Packet looks like IPv4, queue it. l_PacketBuffer->m_SizeFlags |= TP_TUN; + break; case ETH_P_IPV6: // make sure that packet is large ----- End forwarded message -----Signature · 17 lines
-- USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany [email protected]... fax: +49-89-35655025 [email protected]... ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ Openvpn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...From 3e3f3b57e06f1c4d116c006c81494418c79901cb Mon Sep 17 00:00:00 2001
From: Gert Doering <[email protected]...>
Date: Thu, 10 Nov 2011 20:15:44 +0100
Subject: [PATCH] add missing break between "case IPv4" and "case IPv6", leading to
the minimum-size for IPv6 being applied to IPv4 packets, subsequently leading to drop of small-sized IPv4 packets.
Bug found & fixed by Christian Niessner.
--- tap-win32/tapdrvr.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
tap-win32/tapdrvr.c +1 -0
@@ -1766,6 +1766,7 @@ AdapterTransmit (IN NDIS_HANDLE p_AdapterContext,// Packet looks like IPv4, queue it. l_PacketBuffer->m_SizeFlags |=TP_TUN ; +break ;case ETH_P_IPV6 :// make sure that packet is large
Signature · 1 line
1.7.3.4
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 6 lines · Gert Doering
Hi,
as per David's request, a properly git-format-patch formatted patch attached below.
(The bug and fix are *so* obvious if you know where to look)
Applied to -testing and -stable master branches. Also cherry-picked it for the release/2.2 branch - will be included in the next 2.2 release.
commit 10b99726a30bb7252cb01806f5f276be7873e84e (master) commit c5b9d40f0f2917761f430d9d59c59ca66153103f (release/2.2)
Author: Gert Doering <[email protected]...> Date: Thu Nov 10 20:15:44 2011 +0100
Signed-off-by: Christian Niessner <[email protected]...> Acked-by: Gert Doering <[email protected]...> Signed-off-by: Gert Doering <[email protected]...> Signed-off-by: David Sommerseth <[email protected]...>
Kind regards,
David Sommerseth
Quoted 40 lines · Gert Doering
Quoted 39 lines
Hi,
I received a bugfix for my IPv6 patch to the Windows TAP driver today, which affects IPv4 - and there is this open bug with small-size IPv4 packets in our trac, which this should fix...
The problem is a missing "break" statement at the end of the IPv6 block, which now leads to "fall into IPv6 block" and that one has a larger minimum packet size...
ACK from me - David, could you please integrate the one-line patch, and then we need James to compile + sign a new driver (and I think this warrants a 2.2 bugfix release).
[I'm not on IRC these days as I'm technically on vacation, but I saw this mail today and it warrants action]
gert
----- Forwarded message from Christian Niessner
<[email protected]...> -----(quoted diff) +0
-0@@ -1611,6 +1766,27 @@ AdapterTransmit (IN NDIS_HANDLE p_AdapterContext, // Packet looks like IPv4, queue it. l_PacketBuffer->m_SizeFlags |=
TP_TUN; + + caseETH_P_IPV6: + // make sure that
packet is large + // enough to be IPv6 + if
(l_PacketLength+ <ETHERNET_HEADER_SIZE+IPV6_HEADER_SIZE) + gotono_queue; +[..]
---
../tap-win32-latest/tapdrvr.c2011-11-09
17:12:19.000000000 +0100 +++tapdrvr.c2011-11-10
09:24:24.000000000 +0100 @@ -1766,6 +1766,7 @@
Quoted 7 lines
Quoted 7 lines
// Packet looks like IPv4, queue it.
l_PacketBuffer->m_SizeFlags|=TP_TUN; + break;case
ETH_P_IPV6: // make sure that packet is large----- End forwarded message -----
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk68JiYACgkQDC186MBRfrpoFQCfZ3KJGePupm6xqzkywd3i8Kzi qJUAoJpGLqw1HpHjWtCOKNDT1xeoq1KS
=vNsu
-----END PGP SIGNATURE-----