mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-02-18 19:01:44 +00:00
tcp: ipv6: bind() use stronger condition for bind_conflict
We must try harder to get unique (addr, port) pairs when doing port autoselection for sockets with SO_REUSEADDR option set. This is a continuation of commit aacd9289af8b82f5fb01bcdd53d0e3406d1333c7 for IPv6. Signed-off-by: Flavio Leitner <fbl@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
fae4f3cf49
commit
dd9f319d94
@ -54,6 +54,10 @@ int inet6_csk_bind_conflict(const struct sock *sk,
|
||||
if (ipv6_rcv_saddr_equal(sk, sk2))
|
||||
break;
|
||||
}
|
||||
if (!relax && reuse && sk2->sk_reuse &&
|
||||
sk2->sk_state != TCP_LISTEN &&
|
||||
ipv6_rcv_saddr_equal(sk, sk2))
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user