kern/31746: failed connect(2) seems to cause problems
with socket
Robert Watson
rwatson at FreeBSD.org
Sat Jan 14 03:59:53 PST 2006
On Thu, 12 Jan 2006, Gleb Smirnoff wrote:
> Synopsis: failed connect(2) seems to cause problems with socket
>
> State-Changed-From-To: open->closed
> State-Changed-By: glebius
> State-Changed-When: Thu Jan 12 14:05:59 UTC 2006
> State-Changed-Why:
> This is a POSIX compliant behavior. Quoting
>
> http://www.opengroup.org/onlinepubs/000095399/functions/connect.html
>
> "If connect() fails, the state of the socket is unspecified. Conforming
> applications should close the file descriptor and create a new socket before
> attempting to reconnect."
All that said -- I don't like that so_pcb is ending up NULL. Our socket/pcb
state machines are somewhat inconsistent, and it will trip us up in the future
as well. I'll investigate changing the current behavior, assuming it doesn't
require too much immediate socket/pcb code surgery.
Robert N M Watson
More information about the freebsd-bugs
mailing list