Author: cgutman
Date: Sat Apr 4 05:22:33 2009
New Revision: 40359
URL:
http://svn.reactos.org/svn/reactos?rev=40359&view=rev
Log:
- Don't pass the address type to IPInitializePacket because it is set later
- Fix packet corruption caused by using uninitialized data
Modified:
trunk/reactos/lib/drivers/ip/network/icmp.c
trunk/reactos/lib/drivers/ip/network/loopback.c
Modified: trunk/reactos/lib/drivers/ip/network/icmp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/network/icm…
==============================================================================
--- trunk/reactos/lib/drivers/ip/network/icmp.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/ip/network/icmp.c [iso-8859-1] Sat Apr 4 05:22:33 2009
@@ -74,13 +74,12 @@
GetDataPtr( IPPacket->NdisPacket, MaxLLHeaderSize,
(PCHAR *)&IPPacket->Header, &IPPacket->ContigSize );
- IPPacket->Data = ((PCHAR)IPPacket->Header) + IPPacket->HeaderSize;
-
TI_DbgPrint(DEBUG_ICMP, ("Size (%d). Data at (0x%X).\n", Size, Data));
TI_DbgPrint(DEBUG_ICMP, ("NdisPacket at (0x%X).\n", NdisPacket));
IPPacket->HeaderSize = sizeof(IPv4_HEADER);
IPPacket->TotalSize = Size - MaxLLHeaderSize;
+ IPPacket->Data = ((PCHAR)IPPacket->Header) + IPPacket->HeaderSize;
TI_DbgPrint(DEBUG_ICMP, ("Copying Address: %x -> %x\n",
&IPPacket->DstAddr, Destination));
Modified: trunk/reactos/lib/drivers/ip/network/loopback.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/network/loo…
==============================================================================
--- trunk/reactos/lib/drivers/ip/network/loopback.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/ip/network/loopback.c [iso-8859-1] Sat Apr 4 05:22:33 2009
@@ -46,8 +46,7 @@
return;
}
- /* FIXME: IPv4 only */
- IPInitializePacket(&IPPacket, IP_ADDRESS_V4);
+ IPInitializePacket(&IPPacket, 0);
NdisGetFirstBufferFromPacket(XmitPacket,
&NdisBuffer,