Re: [PATCH v6 0/1] MR10553: iphlpapi: Prefer adapters with valid MAC in GetAdaptersInfo.
Huw Davies (@huw) commented about dlls/nsiproxy.sys/ndis.c:
struct if_nameindex *indices = if_nameindex(), *entry; unsigned int append_count = 0; +#ifdef HAVE_BSD_IF_INFO + struct ifaddrs *ifaddrs = NULL; + if (getifaddrs( &ifaddrs ) != 0) ifaddrs = NULL; +#endif
for (entry = indices; entry->if_index; entry++) { - if (!find_entry_from_index( entry->if_index ) && add_entry( entry->if_index, entry->if_name )) + UINT bsd_type; + bsd_type = 0; +#ifdef HAVE_BSD_IF_INFO + if_get_bsd_info( ifaddrs, entry->if_name, &bsd_type ); +#endif + if (!find_entry_from_index( entry->if_index ) && add_entry( entry->if_index, entry->if_name, bsd_type ))
Why don't we just filter out the unwanted interface types in this loop, rather than having `add_entry()` do it? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10553#note_140546
participants (1)
-
Huw Davies (@huw)