mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[TCPIP]
- Only wait to bind to a port if INADDR_ANY is specified - Fixes EADDRNOTAVAIL when running Firefox and ws2_32_winetest sock (which now gets further but still doesn't complete) svn path=/trunk/; revision=52511
This commit is contained in:
parent
afa2c1d664
commit
ba4ec529be
1 changed files with 13 additions and 1 deletions
|
@ -295,9 +295,21 @@ NTSTATUS FileOpenAddress(
|
|||
/* Sanity check */
|
||||
ASSERT(Address->Address[0].Address[0].sin_port == AddrFile->Port);
|
||||
}
|
||||
else if (!AddrIsUnspecified(&AddrFile->Address))
|
||||
{
|
||||
/* The client is trying to bind to a local address so allocate a port now too */
|
||||
AddrFile->Port = TCPAllocatePort(0);
|
||||
|
||||
/* Check for bind success */
|
||||
if (AddrFile->Port == 0xffff)
|
||||
{
|
||||
ExFreePoolWithTag(AddrFile, ADDR_FILE_TAG);
|
||||
return STATUS_ADDRESS_ALREADY_EXISTS;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* The client wants an unspecified port so we wait to see what the TCP library gives us */
|
||||
/* The client wants an unspecified port with an unspecified address so we wait to see what the TCP library gives us */
|
||||
AddrFile->Port = 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue