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:
parent
203350e030
commit
8d7720b0ed
|
@ -1936,6 +1936,7 @@ DWORD WINAPI GetInterfaceInfo( IP_INTERFACE_INFO *table, ULONG *size )
|
||||||
|
|
||||||
for (i = 0; i < count; i++)
|
for (i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
|
if (stat[i].type == IF_TYPE_SOFTWARE_LOOPBACK) continue;
|
||||||
num++;
|
num++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1952,6 +1953,7 @@ DWORD WINAPI GetInterfaceInfo( IP_INTERFACE_INFO *table, ULONG *size )
|
||||||
{
|
{
|
||||||
IP_ADAPTER_INDEX_MAP *row;
|
IP_ADAPTER_INDEX_MAP *row;
|
||||||
|
|
||||||
|
if (stat[i].type == IF_TYPE_SOFTWARE_LOOPBACK) continue;
|
||||||
row = table->Adapter + num++;
|
row = table->Adapter + num++;
|
||||||
row->Index = stat[i].if_index;
|
row->Index = stat[i].if_index;
|
||||||
memcpy( row->Name, device_tcpip, sizeof(device_tcpip) );
|
memcpy( row->Name, device_tcpip, sizeof(device_tcpip) );
|
||||||
|
|
|
@ -1109,7 +1109,6 @@ static void testGetInterfaceInfo(void)
|
||||||
GetIfEntry( &row );
|
GetIfEntry( &row );
|
||||||
ok( !wcscmp( buf->Adapter[i].Name, row.wszName ), "got %s vs %s\n",
|
ok( !wcscmp( buf->Adapter[i].Name, row.wszName ), "got %s vs %s\n",
|
||||||
debugstr_w( buf->Adapter[i].Name ), debugstr_w( row.wszName ) );
|
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" );
|
ok( row.dwType != IF_TYPE_SOFTWARE_LOOPBACK, "got loopback\n" );
|
||||||
}
|
}
|
||||||
HeapFree(GetProcessHeap(), 0, buf);
|
HeapFree(GetProcessHeap(), 0, buf);
|
||||||
|
|
Loading…
Reference in New Issue