summaryrefslogtreecommitdiff
path: root/net/ipv6/inet6_connection_sock.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-04-13 23:01:14 +0400
committerDavid S. Miller <davem@davemloft.net>2011-04-13 23:01:14 +0400
commit3e8c806a08c7beecd972e7ce15c570b9aba64baa (patch)
tree89b0b7bfc919ec8e7dc0866f16715bb626af0cc6 /net/ipv6/inet6_connection_sock.c
parent91a403caf0f26c71ce4407fd235b2d6fb225fba9 (diff)
downloadlinux-3e8c806a08c7beecd972e7ce15c570b9aba64baa.tar.xz
Revert "tcp: disallow bind() to reuse addr/port"
This reverts commit c191a836a908d1dd6b40c503741f91b914de3348. It causes known regressions for programs that expect to be able to use SO_REUSEADDR to shutdown a socket, then successfully rebind another socket to the same ID. Programs such as haproxy and amavisd expect this to work. This should fix kernel bugzilla 32832. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/inet6_connection_sock.c')
-rw-r--r--net/ipv6/inet6_connection_sock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c
index 166054650466..f2c5b0fc0f21 100644
--- a/net/ipv6/inet6_connection_sock.c
+++ b/net/ipv6/inet6_connection_sock.c
@@ -44,7 +44,7 @@ int inet6_csk_bind_conflict(const struct sock *sk,
!sk2->sk_bound_dev_if ||
sk->sk_bound_dev_if == sk2->sk_bound_dev_if) &&
(!sk->sk_reuse || !sk2->sk_reuse ||
- ((1 << sk2->sk_state) & (TCPF_LISTEN | TCPF_CLOSE))) &&
+ sk2->sk_state == TCP_LISTEN) &&
ipv6_rcv_saddr_equal(sk, sk2))
break;
}