Author: cgutman
Date: Wed Dec 17 14:48:52 2008
New Revision: 38158
URL:
http://svn.reactos.org/svn/reactos?rev=38158&view=rev
Log:
Check the status of IPSendDatagram
Modified:
branches/aicom-network-fixes/lib/drivers/ip/transport/rawip/rawip.c
branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/event.c
branches/aicom-network-fixes/lib/drivers/ip/transport/udp/udp.c
Modified: branches/aicom-network-fixes/lib/drivers/ip/transport/rawip/rawip.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
==============================================================================
--- branches/aicom-network-fixes/lib/drivers/ip/transport/rawip/rawip.c [iso-8859-1]
(original)
+++ branches/aicom-network-fixes/lib/drivers/ip/transport/rawip/rawip.c [iso-8859-1] Wed
Dec 17 14:48:52 2008
@@ -230,7 +230,11 @@
TI_DbgPrint(MID_TRACE,("About to send datagram\n"));
- IPSendDatagram( &Packet, NCE, RawIpSendPacketComplete, NULL );
+ if (!NT_SUCCESS(Status = IPSendDatagram( &Packet, NCE, RawIpSendPacketComplete,
NULL )))
+ {
+ FreeNdisPacket(Packet.NdisPacket);
+ return Status;
+ }
TI_DbgPrint(MID_TRACE,("Leaving\n"));
Modified: branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/event.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
==============================================================================
--- branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/event.c [iso-8859-1]
(original)
+++ branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/event.c [iso-8859-1] Wed Dec
17 14:48:52 2008
@@ -64,6 +64,7 @@
IP_PACKET Packet = { 0 };
IP_ADDRESS RemoteAddress, LocalAddress;
PIPv4_HEADER Header;
+ NTSTATUS Status;
if( *data == 0x45 ) { /* IPv4 */
Header = (PIPv4_HEADER)data;
@@ -102,7 +103,11 @@
Packet.SrcAddr = LocalAddress;
Packet.DstAddr = RemoteAddress;
- IPSendDatagram( &Packet, NCE, TCPPacketSendComplete, NULL );
+ if (!NT_SUCCESS(Status = IPSendDatagram( &Packet, NCE, TCPPacketSendComplete,
NULL )))
+ {
+ FreeNdisPacket(Packet.NdisPacket);
+ return OSK_EINVAL;
+ }
return 0;
}
Modified: branches/aicom-network-fixes/lib/drivers/ip/transport/udp/udp.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
==============================================================================
--- branches/aicom-network-fixes/lib/drivers/ip/transport/udp/udp.c [iso-8859-1]
(original)
+++ branches/aicom-network-fixes/lib/drivers/ip/transport/udp/udp.c [iso-8859-1] Wed Dec
17 14:48:52 2008
@@ -200,7 +200,11 @@
return STATUS_UNSUCCESSFUL;
}
- IPSendDatagram( &Packet, NCE, UDPSendPacketComplete, NULL );
+ if (!NT_SUCCESS(Status = IPSendDatagram( &Packet, NCE, UDPSendPacketComplete,
NULL )))
+ {
+ FreeNdisPacket(Packet.NdisPacket);
+ return Status;
+ }
return STATUS_SUCCESS;
}