Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Jan 2006 12:00:10 +0000 (GMT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Gleb Smirnoff <glebius@FreeBSD.org>
Cc:        bachue@bachue.com, freebsd-bugs@FreeBSD.org
Subject:   Re: kern/31746: failed connect(2) seems to cause problems with	socket
Message-ID:  <20060114115916.L38874@fledge.watson.org>
In-Reply-To: <200601121407.k0CE7D3Z004195@freefall.freebsd.org>
References:  <200601121407.k0CE7D3Z004195@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060114115916.L38874>