Author: cgutman
Date: Wed May 20 07:10:49 2009
New Revision: 41011
URL:
http://svn.reactos.org/svn/reactos?rev=41011&view=rev
Log:
- Store the MTU in the packet extension for use during segmentation by miniport drivers
Modified:
trunk/reactos/drivers/network/tcpip/datalink/lan.c
Modified: trunk/reactos/drivers/network/tcpip/datalink/lan.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/data…
==============================================================================
--- trunk/reactos/drivers/network/tcpip/datalink/lan.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/tcpip/datalink/lan.c [iso-8859-1] Wed May 20 07:10:49
2009
@@ -600,6 +600,7 @@
UINT Size;
PLAN_ADAPTER Adapter = (PLAN_ADAPTER)Context;
KIRQL OldIrql;
+ UINT PacketLength;
TI_DbgPrint(DEBUG_DATALINK,
("Called( NdisPacket %x, Offset %d, Adapter %x )\n",
@@ -677,6 +678,14 @@
((PCHAR)LinkAddress)[4] & 0xff,
((PCHAR)LinkAddress)[5] & 0xff));
}
+
+ NdisQueryPacketLength(NdisPacket, &PacketLength);
+
+ if (Adapter->MTU < PacketLength) {
+ /* This is NOT a pointer. MSDN explicitly says so. */
+ NDIS_PER_PACKET_INFO_FROM_PACKET(NdisPacket,
+ TcpLargeSendPacketInfo) =
(PVOID)((ULONG)Adapter->MTU);
+ }
TcpipAcquireSpinLock( &Adapter->Lock, &OldIrql );
TI_DbgPrint(MID_TRACE, ("NdisSend\n"));