Re: [PATCH net] ipv6: Fix SO_REUSEPORT UDP socket with implicit sk_ipv6only

2018-01-29 Thread David Miller
From: Martin KaFai Lau Date: Wed, 24 Jan 2018 23:15:27 -0800 > If a sk_v6_rcv_saddr is !IPV6_ADDR_ANY and !IPV6_ADDR_MAPPED, it > implicitly implies it is an ipv6only socket. However, in inet6_bind(), > this addr_type checking and setting sk->sk_ipv6only to 1 are only done > after sk->sk_prot->g

Re: [PATCH net] ipv6: Fix SO_REUSEPORT UDP socket with implicit sk_ipv6only

2018-01-25 Thread Craig Gallek
On Thu, Jan 25, 2018 at 2:15 AM, Martin KaFai Lau wrote: > If a sk_v6_rcv_saddr is !IPV6_ADDR_ANY and !IPV6_ADDR_MAPPED, it > implicitly implies it is an ipv6only socket. However, in inet6_bind(), > this addr_type checking and setting sk->sk_ipv6only to 1 are only done > after sk->sk_prot->get_po

[PATCH net] ipv6: Fix SO_REUSEPORT UDP socket with implicit sk_ipv6only

2018-01-24 Thread Martin KaFai Lau
If a sk_v6_rcv_saddr is !IPV6_ADDR_ANY and !IPV6_ADDR_MAPPED, it implicitly implies it is an ipv6only socket. However, in inet6_bind(), this addr_type checking and setting sk->sk_ipv6only to 1 are only done after sk->sk_prot->get_port(sk, snum) has been completed successfully. This inconsistency