Author: cgutman
Date: Wed Sep 3 02:32:07 2008
New Revision: 35901
URL:
http://svn.reactos.org/svn/reactos?rev=35901&view=rev
Log:
- Merge aicom-network-fixes up to r35899
Modified:
trunk/reactos/lib/drivers/ip/network/arp.c
trunk/reactos/lib/drivers/ip/transport/rawip/rawip.c
trunk/reactos/lib/drivers/ip/transport/tcp/if.c
trunk/reactos/lib/drivers/ip/transport/udp/udp.c
Modified: trunk/reactos/lib/drivers/ip/network/arp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/network/arp…
==============================================================================
--- trunk/reactos/lib/drivers/ip/network/arp.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/ip/network/arp.c [iso-8859-1] Wed Sep 3 02:32:07 2008
@@ -149,6 +149,8 @@
NULL, /* Don't care */
&Address->Address, /* Target's (remote) protocol address
*/
ARP_OPCODE_REQUEST); /* ARP request */
+
+ if( !NdisPacket ) return FALSE;
ASSERT_KM_POINTER(NdisPacket);
ASSERT_KM_POINTER(PC(NdisPacket));
Modified: trunk/reactos/lib/drivers/ip/transport/rawip/rawip.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/transport/r…
==============================================================================
--- trunk/reactos/lib/drivers/ip/transport/rawip/rawip.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/ip/transport/rawip/rawip.c [iso-8859-1] Wed Sep 3 02:32:07
2008
@@ -143,6 +143,13 @@
break;
}
+ if( !NT_SUCCESS(Status) ) {
+ TI_DbgPrint(MIN_TRACE, ("Cannot add header. Status = (0x%X)\n",
+ Status));
+ FreeNdisPacket(Packet->NdisPacket);
+ return Status;
+ }
+
TI_DbgPrint(MID_TRACE, ("Copying data (hdr %x data %x (%d))\n",
Packet->Header, Packet->Data,
(PCHAR)Packet->Data - (PCHAR)Packet->Header));
Modified: trunk/reactos/lib/drivers/ip/transport/tcp/if.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/transport/t…
==============================================================================
--- trunk/reactos/lib/drivers/ip/transport/tcp/if.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/ip/transport/tcp/if.c [iso-8859-1] Wed Sep 3 02:32:07 2008
@@ -34,9 +34,9 @@
NTSTATUS Status;
POSK_IFADDR ifaddr = exAllocatePool
( NonPagedPool, sizeof(*ifaddr) + 2 * sizeof( struct sockaddr_in ) );
+ if( !ifaddr ) return NULL;
struct sockaddr_in *addr_in = (struct sockaddr_in *)&ifaddr[1];
struct sockaddr_in *dstaddr_in = (struct sockaddr_in *)&addr_in[1];
- if( !ifaddr ) return NULL;
TI_DbgPrint(DEBUG_TCPIF,("Called\n"));
Modified: trunk/reactos/lib/drivers/ip/transport/udp/udp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/transport/u…
==============================================================================
--- trunk/reactos/lib/drivers/ip/transport/udp/udp.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/ip/transport/udp/udp.c [iso-8859-1] Wed Sep 3 02:32:07
2008
@@ -330,6 +330,8 @@
/* Deregister this protocol with IP layer */
IPRegisterProtocol(IPPROTO_UDP, NULL);
+ UDPInitialized = FALSE;
+
return STATUS_SUCCESS;
}