[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20110111.140336.128591591.davem@davemloft.net>
Date: Tue, 11 Jan 2011 14:03:36 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: eric.dumazet@...il.com
Cc: daniel.baluta@...il.com, gasparch@...il.com, netdev@...r.kernel.org
Subject: Re: [PATCH] tcp: disallow bind() to reuse addr/port
From: Eric Dumazet <eric.dumazet@...il.com>
Date: Tue, 11 Jan 2011 12:14:22 +0100
> [PATCH] tcp: disallow bind() to reuse addr/port
>
> inet_csk_bind_conflict() logic currently disallows a bind() if
> it finds a friend socket (a socket bound on same address/port)
> satisfying a set of conditions :
>
> 1) Current (to be bound) socket doesnt have sk_reuse set
> OR
> 2) other socket doesnt have sk_reuse set
> OR
> 3) other socket is in LISTEN state
>
> We should add the CLOSE state in the 3) condition, in order to avoid two
> REUSEADDR sockets in CLOSE state with same local address/port, since
> this can deny further operations.
>
> Note : a prior patch tried to address the problem in a different (and
> buggy) way. (commit fda48a0d7a8412ced tcp: bind() fix when many ports
> are bound).
>
> Reported-by: Gaspar Chilingarov <gasparch@...il.com>
> Reported-by: Daniel Baluta <daniel.baluta@...il.com>
> Signed-off-by: Eric Dumazet <eric.dumazet@...il.com>
Applied, thanks.
--
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