mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
Revert "tcp: disallow bind() to reuse addr/port"
This reverts commit c191a836a9.
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 <[email protected]>
This commit is contained in:
parent
91a403caf0
commit
3e8c806a08
2 changed files with 3 additions and 4 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue