From: "Cyril Bonté" <cyril.bonte@free.fr>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Willy Tarreau <w@1wt.eu>,
netdev@vger.kernel.org, Daniel Baluta <daniel.baluta@gmail.com>,
Gaspar Chilingarov <gasparch@gmail.com>,
Charles Duffy <charles@dyfis.net>
Subject: Re: tcp: disallow bind() to reuse addr/port regression in 2.6.38
Date: Sat, 2 Apr 2011 23:00:33 +0200 [thread overview]
Message-ID: <201104022300.33826.cyril.bonte@free.fr> (raw)
In-Reply-To: <20110402203727.GI5552@1wt.eu>
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.
--
Cyril Bonté
next prev parent reply other threads:[~2011-04-02 21:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-02 18:01 tcp: disallow bind() to reuse addr/port regression in 2.6.38 Cyril Bonté
2011-04-02 18:10 ` Eric Dumazet
2011-04-02 18:46 ` Cyril Bonté
2011-04-02 19:15 ` Willy Tarreau
2011-04-02 19:44 ` Eric Dumazet
2011-04-02 20:37 ` Willy Tarreau
2011-04-02 21:00 ` Cyril Bonté [this message]
2011-04-02 21:18 ` Eric Dumazet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201104022300.33826.cyril.bonte@free.fr \
--to=cyril.bonte@free.fr \
--cc=charles@dyfis.net \
--cc=daniel.baluta@gmail.com \
--cc=eric.dumazet@gmail.com \
--cc=gasparch@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=w@1wt.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox