Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Feb 2001 18:31:33 -0800 (PST)
From:      Archie Cobbs <archie@dellroad.org>
To:        itojun@iijlab.net
Cc:        jlemon@flugsvamp.com, kris@obsecurity.org, net@freebsd.org
Subject:   Re: [itojun@iijlab.net: accept(2) behavior with tcp RST right after handshake]
Message-ID:  <200102130231.SAA72979@curve.dellroad.org>
In-Reply-To: <6290.982027182@coconut.itojun.org> "from itojun@iijlab.net at Feb 13, 2001 10:19:42 am"

next in thread | previous in thread | raw e-mail | index | archive | help
itojun@iijlab.net writes:
> >And what do you mean by ``most apps already do the wrong thing now''?
> 
> 	for background (like when this happens) see previous articles
> 	on this thread.
> 
> 	current behavior: return 0-length sockaddr.

Yeah, that is totally broken.

Hmm.. how long has this been the "current behavior" ?

ISTR at one time you would instead get the actual sockaddr of the
just-closed socket, rather than a bogus sockaddr... and that is the
behavior one would expect.

> 	new behavior: return ECONNABORTED.
> 	SUSv2 suggests this behavior.  it is much safer as accept(2) will fail
> 	so almost every application will go to error case (if you don't have
> 	error check in userland appication, that's problem in application).

Why does SUSv2 suggest this when so many applications would break?
And they work fine doing the old behavior (returning a real sockaddr)?

-Archie

__________________________________________________________________________
Archie Cobbs     *     Packet Design     *     http://www.packetdesign.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




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