On 10/25/22 19:19, Paul Gofman wrote:
On 10/25/22 19:04, Zebediah Figura (@zfigura) wrote:
Zebediah Figura (@zfigura) commented about server/sock.c:
+#ifdef IPV6_V6ONLY + if (sock->family == WS_AF_INET6) + { + socklen_t len = sizeof(*v6only);
+ getsockopt( get_unix_fd(sock->fd), IPPROTO_IPV6, IPV6_V6ONLY, v6only, &len ); + } +#endif
+ if (!is_blocking_addr( sock, addr )) return 0;
+ if ((entry = rb_get( &bound_addresses_tree, addr ))) + { + bound_addr = WINE_RB_ENTRY_VALUE(entry, struct bound_addr, entry); + if (bound_addr->reuse_count == -1 || !sock->reuseaddr) return 1;
This implies that if we bind a socket without REUSEADDR, and then one with REUSEADDR, then we get STATUS_ACCESS_DENIED (i.e. WSAEACCES). That doesn't match what [1] says, and I don't think we have tests for it either. (Nor tests for binding the first socket with REUSEADDR and the second without, for that matter.)
Eh, I guess that was exactly the case at least in the test_so_reuseaddr() before my changes. Should I probably bring this case back additionally?
It'd be nice, yes. I see you've already added in v2 :-)