mirror of
https://github.com/reactos/reactos.git
synced 2025-07-28 12:32:49 +00:00
[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) svn path=/trunk/; revision=59708
This commit is contained in:
parent
84da0d7111
commit
a88dd96b21
1 changed files with 16 additions and 2 deletions
|
@ -444,8 +444,6 @@ PNEIGHBOR_CACHE_ENTRY NBLocateNeighbor(
|
|||
|
||||
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 @@ PNEIGHBOR_CACHE_ENTRY NBLocateNeighbor(
|
|||
|
||||
do
|
||||
{
|
||||
NCE = NeighborCache[HashValue].Cache;
|
||||
while (NCE != NULL)
|
||||
{
|
||||
if (NCE->Interface == Interface &&
|
||||
|
@ -477,6 +476,21 @@ PNEIGHBOR_CACHE_ENTRY NBLocateNeighbor(
|
|||
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);
|
||||
|
||||
TI_DbgPrint(MAX_TRACE, ("Leaving.\n"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue