[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1301779083.2837.30.camel@edumazet-laptop>
Date: Sat, 02 Apr 2011 23:18:03 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: Cyril Bonté <cyril.bonte@...e.fr>
Cc: Willy Tarreau <w@....eu>, netdev@...r.kernel.org,
Daniel Baluta <daniel.baluta@...il.com>,
Gaspar Chilingarov <gasparch@...il.com>,
Charles Duffy <charles@...is.net>
Subject: Re: tcp: disallow bind() to reuse addr/port regression in 2.6.38
Le samedi 02 avril 2011 à 23:00 +0200, Cyril Bonté a écrit :
> Le samedi 2 avril 2011 22:37:27, Willy Tarreau a écrit :
> > On Sat, Apr 02, 2011 at 09:44:55PM +0200, Eric Dumazet wrote:
> > > Is Cyril program running OK on FreeBsd ?
> >
> > I don't think so, as from memories, both FreeBSD and OpenBSD fail
> > on isten() after a shutdown(SHUT_RD), hence the strange looking
> > shut+listen+shut sequence you noticed (in order to detect whether
> > listen will work again or not).
>
> Well, I've just tested it on FreeBSD 8.1.
> As Willy said, the listen() fails but what I observe is that as soon as
> shutdown(SHUT_RW) is called, it is possible to bind a new socket on the same
> port. A modified version of the program to sleep after the shutdown shows that
> launching 3 processes in parallel (delayed to let them bind then shutdown)
> will give 3 connections in CLOSE state.
>
Yes, but as soon as shutdown(SHUT_RDWR) is called on socket fd1, is this
same socket reusable ?
Maybe the only possible action is a close(fd1), and socket not any more
bound.
Man page on shutdown() is a bit silent, and makes sense for non
listening sockets.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists