diff mbox series

[v2] mptcp: fix caller of mptcp_handle_ipv6_mapped

Message ID 20200117172413.1377116-1-matthieu.baerts@tessares.net
State Accepted, archived
Delegated to: Matthieu Baerts
Headers show
Series [v2] mptcp: fix caller of mptcp_handle_ipv6_mapped | expand

Commit Message

Matthieu Baerts Jan. 17, 2020, 5:24 p.m. UTC
This was causing a warning: 'sk' has a 'const' attribute. Good because
it was not the right sk!

Fixes: 77c6b6aec34b (mptcp: handle ipv4-mapped ipv6 address.)
Suggested-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
---

Notes:
    to be squashed in "mptcp: Handle MP_CAPABLE options for outgoing connections"

 net/ipv6/tcp_ipv6.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paolo Abeni Jan. 17, 2020, 5:29 p.m. UTC | #1
On Fri, 2020-01-17 at 18:24 +0100, Matthieu Baerts wrote:
> This was causing a warning: 'sk' has a 'const' attribute. Good because
> it was not the right sk!
> 
> Fixes: 77c6b6aec34b (mptcp: handle ipv4-mapped ipv6 address.)
> Suggested-by: Paolo Abeni <pabeni@redhat.com>
> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
> ---
> 
> Notes:
>     to be squashed in "mptcp: Handle MP_CAPABLE options for outgoing connections"
> 
>  net/ipv6/tcp_ipv6.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
> index b3eacd3549c3..33a578a3eb3a 100644
> --- a/net/ipv6/tcp_ipv6.c
> +++ b/net/ipv6/tcp_ipv6.c
> @@ -1208,7 +1208,7 @@ static struct sock *tcp_v6_syn_recv_sock(const struct sock *sk, struct sk_buff *
>  
>  		inet_csk(newsk)->icsk_af_ops = &ipv6_mapped;
>  		if (sk_is_mptcp(newsk))
> -			mptcp_handle_ipv6_mapped(sk, true);
> +			mptcp_handle_ipv6_mapped(newsk, true);
>  		newsk->sk_backlog_rcv = tcp_v4_do_rcv;
>  #ifdef CONFIG_TCP_MD5SIG
>  		newtp->af_specific = &tcp_sock_ipv6_mapped_specific;

LGMT, thank you for fixing my faults!

/P
Matthieu Baerts Jan. 17, 2020, 5:31 p.m. UTC | #2
Hi Paolo,

On 17/01/2020 18:29, Paolo Abeni wrote:
> On Fri, 2020-01-17 at 18:24 +0100, Matthieu Baerts wrote:
>> This was causing a warning: 'sk' has a 'const' attribute. Good because
>> it was not the right sk!
>>
>> Fixes: 77c6b6aec34b (mptcp: handle ipv4-mapped ipv6 address.)
>> Suggested-by: Paolo Abeni <pabeni@redhat.com>
>> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
>> ---
>>
>> Notes:
>>      to be squashed in "mptcp: Handle MP_CAPABLE options for outgoing connections"
>>
>>   net/ipv6/tcp_ipv6.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
>> index b3eacd3549c3..33a578a3eb3a 100644
>> --- a/net/ipv6/tcp_ipv6.c
>> +++ b/net/ipv6/tcp_ipv6.c
>> @@ -1208,7 +1208,7 @@ static struct sock *tcp_v6_syn_recv_sock(const struct sock *sk, struct sk_buff *
>>   
>>   		inet_csk(newsk)->icsk_af_ops = &ipv6_mapped;
>>   		if (sk_is_mptcp(newsk))
>> -			mptcp_handle_ipv6_mapped(sk, true);
>> +			mptcp_handle_ipv6_mapped(newsk, true);
>>   		newsk->sk_backlog_rcv = tcp_v4_do_rcv;
>>   #ifdef CONFIG_TCP_MD5SIG
>>   		newtp->af_specific = &tcp_sock_ipv6_mapped_specific;
> 
> LGMT, thank you for fixing my faults!

Thank you for the quick review!

- 0a0a8d376ea2: "squashed" in "mptcp: Handle MP_CAPABLE options for 
outgoing connections"
- no signed-off added (because it was Paolo's fix :) )
- 2000db04936b..336d5b81cb58: result

Tests + export are in progress.

Cheers,
Matt
diff mbox series

Patch

diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index b3eacd3549c3..33a578a3eb3a 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -1208,7 +1208,7 @@  static struct sock *tcp_v6_syn_recv_sock(const struct sock *sk, struct sk_buff *
 
 		inet_csk(newsk)->icsk_af_ops = &ipv6_mapped;
 		if (sk_is_mptcp(newsk))
-			mptcp_handle_ipv6_mapped(sk, true);
+			mptcp_handle_ipv6_mapped(newsk, true);
 		newsk->sk_backlog_rcv = tcp_v4_do_rcv;
 #ifdef CONFIG_TCP_MD5SIG
 		newtp->af_specific = &tcp_sock_ipv6_mapped_specific;