In article
<local.mail.freebsd-net/[EMAIL PROTECTED]>
you write:
>
>On Wed, 7 Feb 2001, Archie Cobbs wrote:
>
>> Jonathan Lemon writes:
>> > Jayanth did make one point that an application could assume that
>> > the error return from accept was in regards to the listening socket
>> > instead of the new socket, so that may be a concern.
>>
>> Yes I have always assumed this to be true. If the connection is
>> already broken before I get it, why bother giving it to me??
>
>Well, for the purposes of propagating information up to applications
>consistently on both sides of a connection, the ideal behavior from my
>perspective is:
>
> When a connection comes in and is reset/closed before accept() can
> occur, accept() should return success with a properly filled out
> sockaddr. When the first operation occurs on the socket, it should
> return an appropriate error message based on the close of the socket
> (ECONNRESET most likely).
The difficulty with this is that the peer address is being held
in the inpcb, which is released by tcp_close upon receipt of a RST.
So at the moment, there isn't anywhere to retrieve the sockaddr from.
--
Jonathan
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message