deepin-kernel/net/mptcp
Matthieu Baerts (NGI0) df5195ea7b mptcp: sockopt: fix getting freebind & transparent
commit e2f4ac7bab upstream.

When adding a socket option support in MPTCP, both the get and set parts
are supposed to be implemented.

IP(V6)_FREEBIND and IP(V6)_TRANSPARENT support for the setsockopt part
has been added a while ago, but it looks like the get part got
forgotten. It should have been present as a way to verify a setting has
been set as expected, and not to act differently from TCP or any other
socket types.

Everything was in place to expose it, just the last step was missing.
Only new code is added to cover these specific getsockopt(), that seems
safe.

Fixes: c9406a23c1 ("mptcp: sockopt: add SOL_IP freebind & transparent options")
Cc: stable@vger.kernel.org
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250314-net-mptcp-fix-data-stream-corr-sockopt-v1-3-122dbb249db3@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
[ Conflict in sockopt.c due to commit e08d0b3d17 ("inet: implement
  lockless IP_TOS") not being in this version. The conflict is in the
  context and the modification can still be applied in
  mptcp_getsockopt_v4() after the IP_TOS case. ]
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 392dfed4af7244ace265a565e2823970d327b495)
2025-05-09 22:54:46 +08:00
..
Kconfig kunit: mptcp: adhere to KUNIT formatting standard 2021-04-16 17:10:40 -07:00
Makefile mptcp: add struct mptcp_sched_ops 2023-08-22 17:31:18 -07:00
bpf.c bpf: Add update_socket_protocol hook 2023-08-16 10:22:16 -07:00
crypto.c kunit: mptcp: adhere to KUNIT formatting standard 2021-04-16 17:10:40 -07:00
crypto_test.c mptcp: move crypto test to KUNIT 2020-06-26 16:21:39 -07:00
ctrl.c mptcp: sysctl: sched: avoid using current->nsproxy 2025-01-19 12:48:46 +08:00
diag.c mptcp: correct MPTCP_SUBFLOW_ATTR_SSN_OFFSET reserved size 2024-12-10 20:40:42 +08:00
fastopen.c mptcp: pr_debug: add missing \n at the end 2024-12-10 20:41:09 +08:00
mib.c mptcp: prevent MPC handshake on port-based signal endpoints 2024-12-10 20:42:56 +08:00
mib.h mptcp: prevent MPC handshake on port-based signal endpoints 2024-12-10 20:42:56 +08:00
mptcp_diag.c tcp: Access &tcp_hashinfo via net. 2022-09-20 10:21:49 -07:00
options.c mptcp: Fix data stream corruption in the address announcement 2025-04-14 13:52:15 +08:00
pm.c mptcp: pr_debug: add missing \n at the end 2024-12-10 20:41:09 +08:00
pm_netlink.c mptcp: fix 'scheduling while atomic' in mptcp_pm_nl_append_new_local_addr 2025-03-18 15:20:51 +08:00
pm_userspace.c mptcp: hold pm lock when deleting entry 2024-12-10 20:43:57 +08:00
protocol.c mptcp: prevent excessive coalescing on receive 2025-02-18 11:53:09 +08:00
protocol.h mptcp: safety check before fallback 2025-03-23 19:56:38 +08:00
sched.c mptcp: pr_debug: add missing \n at the end 2024-12-10 20:41:09 +08:00
sockopt.c mptcp: sockopt: fix getting freebind & transparent 2025-05-09 22:54:46 +08:00
subflow.c mptcp: only inc MPJoinAckHMacFailure for HMAC failures 2025-05-09 18:47:26 +08:00
syncookies.c mptcp: don't return sockets in foreign netns 2021-09-24 10:51:36 +01:00
token.c mptcp: add statistics for mptcp socket in use 2023-01-09 07:30:50 +00:00
token_test.c mptcp: init sk->sk_prot in build_msk() 2023-01-09 07:30:50 +00:00