http://bugs.winehq.org/show_bug.cgi?id=59682 --- Comment #3 from marisa <marisa.adinolfi@italtel.com> --- Root cause analysis (Wine 8.10, AlmaLinux 8, kernel 4.18 el8) The problem occurs specifically when multiple local IPs are configured on the SAME network interface and the app binds UDP sockets to different specific IPs on the same port. strace of wineserver during a bind to a specific IP (e.g. 10.5.87.4:5060): setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, "ens224") = -1 EPERM setsockopt(fd, SOL_IP, IP_UNICAST_IF, ...) = 0 setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, ...) = 0 bind(fd, {sin_port=htons(5060), sin_addr=0.0.0.0}) = -1 EADDRINUSE In server/sock.c, bind_to_interface() / bind_to_iface_name(): SO_BINDTODEVICE fails (no CAP_NET_RAW), but the fallback IP_UNICAST_IF + SO_ATTACH_FILTER succeeds, so bind_to_interface() returns success and the IOCTL_AFD_BIND handler replaces the address with INADDR_ANY. The interface-level restriction (BPF filter on ifindex) cannot distinguish between multiple IPs on the same interface. As a result every socket ends up bound to 0.0.0.0 on the same port, causing EADDRINUSE on the second bind and a wrong source IP on outgoing datagrams. Note: on this kernel SO_ATTACH_FILTER (classic cBPF via setsockopt) succeeds even with kernel.unprivileged_bpf_disabled=1, because that sysctl only affects eBPF via the bpf() syscall, not classic cBPF. Expected: a socket explicitly bound to a specific local IP should stay bound to that IP (Windows behaviour), so that multiple sockets can share the same UDP port on different local IPs of the same interface, and outgoing packets use the correct source IP. Workaround that confirms the diagnosis: forcing SO_ATTACH_FILTER / IP_UNICAST_IF to fail (so bind_to_interface() returns FALSE) makes Wine keep the specific IP; bind then works correctly. The only functional loss is broadcast reception on those sockets, which is irrelevant for unicast UDP (e.g. SIP). -- 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.