iphlpapi: Don't enumerate loopback interfaces in GetInterfaceInfo().

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Huw Davies 2021-08-19 08:53:42 +01:00 committed by Alexandre Julliard
parent 203350e030
commit 8d7720b0ed
2 changed files with 2 additions and 1 deletions

View File

@ -1936,6 +1936,7 @@ DWORD WINAPI GetInterfaceInfo( IP_INTERFACE_INFO *table, ULONG *size )
for (i = 0; i < count; i++)
{
if (stat[i].type == IF_TYPE_SOFTWARE_LOOPBACK) continue;
num++;
}
@ -1952,6 +1953,7 @@ DWORD WINAPI GetInterfaceInfo( IP_INTERFACE_INFO *table, ULONG *size )
{
IP_ADAPTER_INDEX_MAP *row;
if (stat[i].type == IF_TYPE_SOFTWARE_LOOPBACK) continue;
row = table->Adapter + num++;
row->Index = stat[i].if_index;
memcpy( row->Name, device_tcpip, sizeof(device_tcpip) );

View File

@ -1109,7 +1109,6 @@ static void testGetInterfaceInfo(void)
GetIfEntry( &row );
ok( !wcscmp( buf->Adapter[i].Name, row.wszName ), "got %s vs %s\n",
debugstr_w( buf->Adapter[i].Name ), debugstr_w( row.wszName ) );
todo_wine_if( row.dwType == IF_TYPE_SOFTWARE_LOOPBACK)
ok( row.dwType != IF_TYPE_SOFTWARE_LOOPBACK, "got loopback\n" );
}
HeapFree(GetProcessHeap(), 0, buf);