Author: cgutman
Date: Mon Aug 12 06:46:06 2013
New Revision: 59709
URL: http://svn.reactos.org/svn/reactos?rev=59709&view=rev
Log:
[TCPIP]
- Disable object logging now that all the deadlocks, leaks, double-frees, and use-after-frees visible in our test suite are fixed in TCP/IP
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 Aug 12 06:46:06 2013
@@ -11,7 +11,7 @@
#include "precomp.h"
/* Uncomment for logging of connections and address files every 10 seconds */
-#define LOG_OBJECTS
+//#define LOG_OBJECTS
/* List of all address file objects managed by this driver */
LIST_ENTRY AddressFileListHead;
Author: cgutman
Date: Mon Aug 12 06:00:06 2013
New Revision: 59708
URL: http://svn.reactos.org/svn/reactos?rev=59708&view=rev
Log:
[IP]
- Fix a nasty bug preventing any of the non-default interface's NCEs from being selected
- Fix a bug preventing loopback NCEs from being found (fixes hang in ws2_32:sock winetest)
Modified:
trunk/reactos/lib/drivers/ip/network/neighbor.c
Modified: trunk/reactos/lib/drivers/ip/network/neighbor.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/network/nei…
==============================================================================
--- trunk/reactos/lib/drivers/ip/network/neighbor.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/ip/network/neighbor.c [iso-8859-1] Mon Aug 12 06:00:06 2013
@@ -444,8 +444,6 @@
TcpipAcquireSpinLock(&NeighborCache[HashValue].Lock, &OldIrql);
- NCE = NeighborCache[HashValue].Cache;
-
/* If there's no adapter specified, we'll look for a match on
* each one. */
if (Interface == NULL)
@@ -460,6 +458,7 @@
do
{
+ NCE = NeighborCache[HashValue].Cache;
while (NCE != NULL)
{
if (NCE->Interface == Interface &&
@@ -476,6 +475,21 @@
}
while ((FirstInterface != NULL) &&
((Interface = GetDefaultInterface()) != FirstInterface));
+
+ if ((NCE == NULL) && (FirstInterface != NULL))
+ {
+ /* This time we'll even match loopback NCEs */
+ NCE = NeighborCache[HashValue].Cache;
+ while (NCE != NULL)
+ {
+ if (AddrIsEqual(Address, &NCE->Address))
+ {
+ break;
+ }
+
+ NCE = NCE->Next;
+ }
+ }
TcpipReleaseSpinLock(&NeighborCache[HashValue].Lock, OldIrql);