From 1ec94de852701ec52f9b4b0e79b5a354442e3955 Mon Sep 17 00:00:00 2001 From: Evgeny Date: Thu, 13 Aug 2026 23:15:14 +0300 Subject: [PATCH] =?UTF-8?q?platform=5Fcompat:=20=D1=84=D0=B8=D0=BA=D1=81?= =?UTF-8?q?=20Windows-=D1=81=D0=B1=D0=BE=D1=80=D0=BA=D0=B8=20(Ipv4IfIndex/?= =?UTF-8?q?Ipv6IfIndex=20=D0=BE=D1=82=D1=81=D1=83=D1=82=D1=81=D1=82=D0=B2?= =?UTF-8?q?=D1=83=D1=8E=D1=82,=20GetBestInterfaceEx=20=D0=B1=D0=B5=D0=B7?= =?UTF-8?q?=20const)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/platform_compat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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