http://bugs.winehq.org/show_bug.cgi?id=60516 Bug ID: 60516 Summary: Zeroconf 3.7.16 (.NET mDNS library): service discovery fails with SocketException 10022 (Invalid argument) Product: Wine Version: 11.19 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winsock Assignee: wine-bugs@list.winehq.org Reporter: marvin.gnad@herrmannultraschall.com Target Milestone: --- Distribution: --- Created attachment 82375 --> http://bugs.winehq.org/attachment.cgi?id=82375 Terminal output with WINEDEBUG=+winsock A .NET 8 application using the Zeroconf library (https://www.nuget.org/packages/Zeroconf/3.7.16) fails under Wine with SocketException 10022 when it starts an mDNS query. On Windows the same application discovers the services. Steps to reproduce: 1. Create a .NET 8 console app that references Zeroconf 3.7.16 and calls ZeroconfResolver.ResolveAsync("_opcua-tcp._tcp.local."). 2. Publish it self-contained for win-x64 and run it with "wine app.exe" in a clean prefix. Expected: no exception (the call returns the services found, or an empty list). Actual: SocketException 10022 from Socket.SetSocketOption. No mDNS service needs to be present on the network; the error happens while the socket is set up. The +winsock trace (attached) shows setsockopt(IPPROTO_IP, IP_MULTICAST_IF) failing for each interface Zeroconf uses (7 interfaces, 14 calls including retries), e.g.: setsockopt ... name IP_MULTICAST_IF, optval ... (436207616), optlen 4 server_setsockopt status 0xc000000d. 436207616 is 0.0.0.26 in network byte order, i.e. interface index 26. Windows treats values in the 0.x.x.x range (except 0.0.0.0) as an interface index: https://learn.microsoft.com/en-us/windows/win32/winsock/ipproto-ip-socket-op... (IP_MULTICAST_IF) https://learn.microsoft.com/en-us/windows/win32/api/ws2ipdef/ns-ws2ipdef-ip_... (imr_interface) In a separate test, IP_ADD_MEMBERSHIP with an interface index in imr_interface failed the same way (not in the attached log, as Zeroconf fails before reaching it). Passing the interface's IPv4 address instead of the index works for both options. Environment: Arch Linux x86-64, Wine 11.19 (distribution package, unmodified), clean prefix, no DLL overrides. Note: the hostname and IP addresses in the attached log were replaced with placeholders (HOSTNAME, 192.0.2.x, 198.51.100.x, 203.0.113.x, 2001:db8::x, fe80::x). -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.