mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
ipv6: Fix inet6_csk_bind_conflict()
Commit fda48a0d7a (tcp: bind() fix when many ports are bound)
introduced a bug on IPV6 part.
We should not call ipv6_addr_any(inet6_rcv_saddr(sk2)) but
ipv6_addr_any(inet6_rcv_saddr(sk)) because sk2 can be IPV4, while sk is
IPV6.
Reported-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Eric Dumazet <[email protected]>
Tested-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
401da6aea3
commit
6443bb1fc2
1 changed files with 1 additions and 1 deletions
|
|
@ -48,7 +48,7 @@ int inet6_csk_bind_conflict(const struct sock *sk,
|
|||
ipv6_rcv_saddr_equal(sk, sk2))
|
||||
break;
|
||||
else if (sk->sk_reuse && sk2->sk_reuse &&
|
||||
!ipv6_addr_any(inet6_rcv_saddr(sk2)) &&
|
||||
!ipv6_addr_any(inet6_rcv_saddr(sk)) &&
|
||||
ipv6_rcv_saddr_equal(sk, sk2))
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue