Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
mptcp: set icsk_af_ops to mptcp_v6 one if mptcp
Browse files Browse the repository at this point in the history
abcdxyzk recently opened a very detailed bug report on Github where it
is noticed that surprisingly, AF_INET{4,6} operations were set to MPTCP
specific functions if the attached connection was *not* an MPTCP one.

This is a typo of course.

As explained by Christoph, there was no consequences: mptcp_v6_mapped
only changes conn_request to mptcp_conn_request(): that's only important
with listening sockets, not used here then.

Anyway, it is still better to properly fix that just in case other
functions from mptcp_v6_mapped are modified later.

Closes: #501
Fixes: db745ef ("mptcp: Only access the sysctl once to detect mptcp-enabled")
Suggested-by: Christoph Paasch <cpaasch@apple.com>
Reviewed-by: Timothée Boucher-Lambert <timothee.boucher-lambert@tessares.net>
Acked-by: Christoph Paasch <cpaasch@apple.com>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
(cherry picked from commit edd63c2)
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
(cherry picked from commit 772b4de)
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
(cherry picked from commit 6baa3e5)
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
  • Loading branch information
matttbe committed Jan 4, 2023
1 parent f425af6 commit 73ff6b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv6/tcp_ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,7 @@ struct sock *tcp_v6_syn_recv_sock(const struct sock *sk, struct sk_buff *skb,
/* We must check on the request-socket because the listener
* socket's flag may have been changed halfway through.
*/
if (!inet_rsk(req)->saw_mpc)
if (inet_rsk(req)->saw_mpc)
inet_csk(newsk)->icsk_af_ops = &mptcp_v6_mapped;
else
#endif
Expand Down

0 comments on commit 73ff6b6

Please sign in to comment.