On Mon Apr 6 16:19:29 2026 +0000, Paul Gofman wrote:
Won't that filter out loopback adapters? Also, I have wireguard interface here, it also doesn't have MAC address, maybe there are more cases. Such sort of filtering, if done correctly, should be performed in nsiproxy.sys and not in iphlpapi. I hope there should be a better way to detect the adapters we are not interested in (possibly Mac specific, there is a lot of Mac specific handling in nsirpoxy.sys). Another possibility is that those pseudo adapters should not be filtered out but maybe instead sorted properly so they don't appear first. This should be confirmed on Windows how such pseudo adapters looks like and if that is the sort order and not their presence which is actually different from Windows. If there is no obvious difference another potential possibility is that the affected app is also broken on Windows if VPN adapters are present and we don't have anything to fix here. Thanks for the review. This patch ecae98b8c11f56042794290e83ffae30ef98de2a doesn't filter out loopback, WireGuard, or other pseudo adapters - it only reorders the list so physical Ethernet and Wi-Fi adapters with a valid MAC come first.
On macOS, the current backend order follows the system `if_index`, so tunnel interfaces like `gif0` and `stf0` can appear before physical adapters. The change here is to normalize the order so physical adapters are placed first, which matches the order I observed on Windows. I also investigated the Aion 4.8 case. The client calls `GetAdaptersInfo` with a fixed buffer of 11264 bytes. On a system with 25 interfaces, the API returns `ERROR_BUFFER_OVERFLOW` and reports that 17088 bytes are needed. The client does not retry, so it never gets a valid adapter list and falls back to an empty MAC string. That is why the server sees an empty MAC. The issue here is that the app never receives a usable adapter list on this path. The sorting change helps apps that take the first adapter from `GetAdaptersInfo`, but it does not change the fixed-buffer overflow behavior in Aion. I'll also attach the logs from before and after these changes. [ndis_clean.txt](/uploads/6a96683e4b2e68ef9f9014df42d9ad55/ndis_clean.txt) [ndis_changes.txt](/uploads/94ecfe0943169b81ea0f8dd8015cde4d/ndis_changes.txt) -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10553#note_135127