[Bug 265064] connect(2): unexpected EADDRINUSE when connecting from IPv6 wildcard to IPv4 address
Date: Sun, 24 Jul 2022 22:12:12 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265064 Mike Karels <karels@freebsd.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |karels@freebsd.org --- Comment #2 from Mike Karels <karels@freebsd.org> --- The problem is that the bind() for the failing socket should not have succeeded, and the problem isn't discovered until the connect(). The root problem is that bind on an IPv6 socket is allowed to choose a port that is already bound by a previous socket, but which has been connected and hence turned into an IPv4 socket. The connect cannot succeed then, because it would create a fully duplicate session (4-tuple). I am looking at a fix for the bind, but it is somewhat messy. -- You are receiving this mail because: You are the assignee for the bug.