Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'mptcp-sync-the-msk-sndbuf-at-accept-time'

Matthieu Baerts says:

====================
mptcp: sync the msk->sndbuf at accept() time

On passive MPTCP connections, the MPTCP socket send buffer doesn't have
the expected size at accept() time.

Patch 1 fixes the regression introduced in v6.7, while the following one
validates the fix in the selftests.

Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
====================

Link: https://patch.msgid.link/20260420-net-mptcp-sync-sndbuf-accept-v1-0-e3523e3aeb44@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

+29 -1
+1 -1
net/mptcp/protocol.c
··· 3594 3594 * uses the correct data 3595 3595 */ 3596 3596 mptcp_copy_inaddrs(nsk, ssk); 3597 - __mptcp_propagate_sndbuf(nsk, ssk); 3598 3597 3599 3598 mptcp_rcv_space_init(msk, ssk); 3600 3599 msk->rcvq_space.time = mptcp_stamp(); ··· 4251 4252 4252 4253 mptcp_graft_subflows(newsk); 4253 4254 mptcp_rps_record_subflows(msk); 4255 + __mptcp_propagate_sndbuf(newsk, mptcp_subflow_tcp_sock(subflow)); 4254 4256 4255 4257 /* Do late cleanup for the first subflow as necessary. Also 4256 4258 * deal with bad peers not doing a complete shutdown.
+28
tools/testing/selftests/net/mptcp/diag.sh
··· 322 322 done 323 323 } 324 324 325 + chk_sndbuf() 326 + { 327 + local server_sndbuf client_sndbuf msg 328 + local port=${1} 329 + 330 + msg="....chk sndbuf server/client" 331 + server_sndbuf=$(ss -N "${ns}" -inmHM "sport" "${port}" | \ 332 + sed -n 's/.*tb\([0-9]\+\).*/\1/p') 333 + client_sndbuf=$(ss -N "${ns}" -inmHM "dport" "${port}" | \ 334 + sed -n 's/.*tb\([0-9]\+\).*/\1/p') 335 + 336 + mptcp_lib_print_title "${msg}" 337 + if [ -z "${server_sndbuf}" ] || [ -z "${client_sndbuf}" ]; then 338 + mptcp_lib_pr_fail "sndbuf S=${server_sndbuf} C=${client_sndbuf}" 339 + mptcp_lib_result_fail "${msg}" 340 + ret=${KSFT_FAIL} 341 + elif [ "${server_sndbuf}" != "${client_sndbuf}" ]; then 342 + mptcp_lib_pr_fail "sndbuf S=${server_sndbuf} != C=${client_sndbuf}" 343 + mptcp_lib_result_fail "${msg}" 344 + ret=${KSFT_FAIL} 345 + else 346 + mptcp_lib_pr_ok 347 + mptcp_lib_result_pass "${msg}" 348 + fi 349 + } 350 + 351 + 325 352 trap cleanup EXIT 326 353 mptcp_lib_ns_init ns 327 354 ··· 368 341 127.0.0.1 >/dev/null & 369 342 wait_connected $ns 10000 370 343 chk_msk_nr 2 "after MPC handshake" 344 + chk_sndbuf 10000 371 345 chk_last_time_info 10000 372 346 chk_msk_remote_key_nr 2 "....chk remote_key" 373 347 chk_msk_fallback_nr 0 "....chk no fallback"