Author: cgutman
Date: Fri Jun 24 22:35:29 2011
New Revision: 52447
URL:
http://svn.reactos.org/svn/reactos?rev=52447&view=rev
Log:
[IP]
- Set address length in the TDI address struct
- Simplify copying the address
- Zero the sin_zero member
Modified:
trunk/reactos/lib/drivers/ip/transport/datagram/datagram.c
Modified: trunk/reactos/lib/drivers/ip/transport/datagram/datagram.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/transport/d…
==============================================================================
--- trunk/reactos/lib/drivers/ip/transport/datagram/datagram.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/ip/transport/datagram/datagram.c [iso-8859-1] Fri Jun 24
22:35:29 2011
@@ -135,15 +135,14 @@
RTAIPAddress = (PTA_IP_ADDRESS)Current->ReturnInfo->RemoteAddress;
RTAIPAddress->TAAddressCount = 1;
RTAIPAddress->Address->AddressType = TDI_ADDRESS_TYPE_IP;
+ RTAIPAddress->Address->AddressLength = TDI_ADDRESS_LENGTH_IP;
RTAIPAddress->Address->Address->sin_port = SrcPort;
+ RTAIPAddress->Address->Address->in_addr =
SrcAddress->Address.IPv4Address;
+ RtlZeroMemory(RTAIPAddress->Address->Address->sin_zero, 8);
TI_DbgPrint(MAX_TRACE, ("(A: %08x) Addr %08x Port %04x\n",
RTAIPAddress,
SrcAddress->Address.IPv4Address, SrcPort));
-
- RtlCopyMemory( &RTAIPAddress->Address->Address->in_addr,
- &SrcAddress->Address.IPv4Address,
- sizeof(SrcAddress->Address.IPv4Address) );
ReferenceObject(AddrFile);
UnlockObject(AddrFile, OldIrql);