From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: grzegorz.chwesewicz@retis.net.pl, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, Evgeniy Polyakov <zbr@ioremap.net>
Subject: Re: Problem with "tcp: bind() fix when many ports are bound" commit
Date: Wed, 28 Apr 2010 19:44:57 +0200 [thread overview]
Message-ID: <1272476697.2267.95.camel@edumazet-laptop> (raw)
In-Reply-To: <1272476040.2267.87.camel@edumazet-laptop>
Le mercredi 28 avril 2010 à 19:34 +0200, Eric Dumazet a écrit :
> L
> I am going to test following patch in a couple of hours (I have to
> run ...)
>
> Always allowing a reuse LISTEN if no other listener is already active on
> same IP.
>
> diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
> index 78cbc39..e2076dd 100644
> --- a/net/ipv4/inet_connection_sock.c
> +++ b/net/ipv4/inet_connection_sock.c
> @@ -78,6 +78,7 @@ int inet_csk_bind_conflict(const struct sock *sk,
> sk2_rcv_saddr == sk_rcv_saddr)
> break;
> } else if (reuse && sk2->sk_reuse &&
> + sk->sk_state != TCP_LISTEN &&
> sk2_rcv_saddr &&
> sk2_rcv_saddr == sk_rcv_saddr)
> break;
>
>
> --
Hmm, this wont work because we dont know this sk socket will serve as a
listener.
bind(... port=80);
listen(...) or connect(...)
David, I think we should revert patches for linux-2.6, and work on this
problem more closely on net-next-2.6
Thanks
next prev parent reply other threads:[~2010-04-28 17:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4BD82B29.3000105@retis.net.pl>
2010-04-28 16:50 ` Problem with "tcp: bind() fix when many ports are bound" commit David Miller
2010-04-28 17:34 ` Eric Dumazet
2010-04-28 17:44 ` Eric Dumazet [this message]
2010-04-28 17:51 ` David Miller
2010-04-28 17:59 ` Grzegorz Chwesewicz
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=1272476697.2267.95.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=grzegorz.chwesewicz@retis.net.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=zbr@ioremap.net \
/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