diff --git a/lib/platform_compat.c b/lib/platform_compat.c index 80d4656c..ece193c1 100644 --- a/lib/platform_compat.c +++ b/lib/platform_compat.c @@ -298,7 +298,7 @@ static PIP_ADAPTER_ADDRESSES plat_win_get_adapters(ULONG family) { static PIP_ADAPTER_ADDRESSES plat_win_find_adapter(PIP_ADAPTER_ADDRESSES adapters, uint32_t ifindex) { for (PIP_ADAPTER_ADDRESSES a = adapters; a; a = a->Next) { - if (a->IfIndex == ifindex || a->Ipv4IfIndex == ifindex || a->Ipv6IfIndex == ifindex) return a; + if (a->IfIndex == ifindex) return a; } return NULL; } @@ -368,7 +368,7 @@ uint32_t get_default_route_netif_index(int family) { return 0; } DWORD idx = 0; - if (GetBestInterfaceEx((const SOCKADDR*)&dst, &idx) != NO_ERROR) return 0; + if (GetBestInterfaceEx((SOCKADDR*)&dst, &idx) != NO_ERROR) return 0; return (uint32_t)idx; } #endif