https://bugs.winehq.org/show_bug.cgi?id=52557
Bug ID: 52557 Summary: GetNetworkParams loops forever on musl Product: Wine Version: 7.2 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: iphlpapi Assignee: wine-bugs@winehq.org Reporter: me@atiltedtree.dev Distribution: ---
On musl, res_getservers does not exist and dnsapi/resolv_get_serverlist will fall back to res_state.nsaddr_list. But musl also does not set res_state.nsaddr_list causing dnsapi/resolv_get_serverlist to always return DNS_ERROR_NO_DNS_SERVERS.
iphlpapi/get_dns_server_list will call DnsQueryConfig( DnsConfigDnsServerList, ...), which calls dnsapi/resolv_get_serverlist, until it does not return an error, but on musl it will always return an error causing iphlpapi/get_dns_server_list to loop infinitely.
This means that any application that calls iphlpapi.GetNetworkParams or iphlpapi.GetPerAdapterInfo will loop infinitely, if wine was built on musl.