[TCPIP] Copy back unicast IP if broadcast is specified for listen.
authorPeter Hater <7element@mail.bg>
Wed, 2 Nov 2016 11:24:08 +0000 (11:24 +0000)
committerPeter Hater <7element@mail.bg>
Wed, 2 Nov 2016 11:24:08 +0000 (11:24 +0000)
CORE-12152

svn path=/trunk/; revision=73095

reactos/sdk/lib/drivers/ip/transport/tcp/tcp.c

index 68b18f2..526a64b 100644 (file)
@@ -337,6 +337,12 @@ NTSTATUS TCPConnect
     
     if (NT_SUCCESS(Status))
     {
+        /* Check if we had an unspecified address */
+        if (Connection->AddressFile->Address.Address.IPv4Address != bindaddr.addr)
+        {
+            /* We did, so we need to copy back the address */
+            Connection->AddressFile->Address.Address.IPv4Address = bindaddr.addr;
+        }
         /* Check if we had an unspecified port */
         if (!Connection->AddressFile->Port)
         {