Author: cgutman
Date: Mon Oct 27 15:43:44 2008
New Revision: 37032
URL:
http://svn.reactos.org/svn/reactos?rev=37032&view=rev
Log:
- Merge r37029 from aicom-network-fixes
- This fixes the last of all the port allocation bugs that I know of
Modified:
trunk/reactos/drivers/network/tcpip/tcpip/fileobjs.c
Modified: trunk/reactos/drivers/network/tcpip/tcpip/fileobjs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/tcpi…
==============================================================================
--- trunk/reactos/drivers/network/tcpip/tcpip/fileobjs.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/tcpip/tcpip/fileobjs.c [iso-8859-1] Mon Oct 27 15:43:44
2008
@@ -286,8 +286,9 @@
AddrFile->Port =
TCPAllocatePort(Address->Address[0].Address[0].sin_port);
- if (Address->Address[0].Address[0].sin_port &&
- AddrFile->Port != Address->Address[0].Address[0].sin_port)
+ if ((Address->Address[0].Address[0].sin_port &&
+ AddrFile->Port != Address->Address[0].Address[0].sin_port) ||
+ AddrFile->Port == 0xffff)
{
ExFreePool(AddrFile);
return STATUS_INVALID_PARAMETER;
@@ -301,8 +302,9 @@
AddrFile->Port =
UDPAllocatePort(Address->Address[0].Address[0].sin_port);
- if (Address->Address[0].Address[0].sin_port &&
- AddrFile->Port != Address->Address[0].Address[0].sin_port)
+ if ((Address->Address[0].Address[0].sin_port &&
+ AddrFile->Port != Address->Address[0].Address[0].sin_port) ||
+ AddrFile->Port == 0xffff)
{
ExFreePool(AddrFile);
return STATUS_INVALID_PARAMETER;