mirror-linux/net/mptcp
Gang Yan 3a543ae0e2 mptcp: update window_clamp on subflows when SO_RCVBUF is set
Add __mptcp_subflow_set_rcvbuf() helper to write the subflow sk_rcvbuf,
but also to call the recently added tcp_set_rcvbuf() helper to update
window_clamp. This is needed because the window clap is updated when
scaling_ratio changes, in tcp_measure_rcv_mss(). Until scaling_ratio
changes, the subflow is stuck with the old window clamp which may be
based on a small initial buffer.

Use this new helper in both mptcp_sol_socket_sync_intval() (setsockopt
path) and sync_socket_options() (new subflow creation path).

Note that this patch depends on commit b025461303 ("tcp: update
window_clamp when SO_RCVBUF is set"): it fixes the issue on TCP side,
but the same fix is needed on MPTCP side as well.

Fixes: a2cbb16039 ("tcp: Update window clamping condition")
Cc: stable@vger.kernel.org
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/619
Signed-off-by: Gang Yan <yangang@kylinos.cn>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260515-net-mptcp-misc-fixes-7-1-rc4-v2-5-701e96419f2f@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-05-19 15:36:35 +02:00
..
Kconfig mptcp: select CRYPTO_LIB_UTILS instead of CRYPTO 2025-12-08 23:44:16 -08:00
Makefile mptcp: pm: split in-kernel PM specific code 2025-03-10 13:35:50 -07:00
bpf.c mptcp: bpf: Fix type confusion in bpf_mptcp_sock_from_subflow() 2026-05-08 11:38:10 -07:00
crypto.c mptcp: use HMAC-SHA256 library instead of open-coded HMAC 2025-09-03 15:08:20 -07:00
crypto_test.c
ctrl.c mptcp: reset blackhole on success with non-loopback ifaces 2025-09-19 07:06:19 -07:00
diag.c tcp: ulp: diag: more info without CAP_NET_ADMIN 2025-03-07 19:39:53 -08:00
fastopen.c mptcp: fix rx timestamp corruption on fastopen 2026-05-04 19:20:50 -07:00
mib.c mptcp: borrow forward memory from subflow 2025-11-24 19:49:42 -08:00
mib.h mptcp: borrow forward memory from subflow 2025-11-24 19:49:42 -08:00
mptcp_diag.c mptcp: introduce mptcp-level backlog 2025-11-24 19:49:43 -08:00
mptcp_pm_gen.c tools: ynl-gen: add regeneration comment 2025-11-25 19:20:42 -08:00
mptcp_pm_gen.h tools: ynl-gen: add regeneration comment 2025-11-25 19:20:42 -08:00
options.c mptcp: keep rcv_mwnd_seq in sync with subflow rcv_wnd 2026-03-14 08:01:49 -07:00
pm.c mptcp: pm: fix ADD_ADDR timer infinite retry on option space insufficient 2026-05-19 15:36:35 +02:00
pm_kernel.c mptcp: pm: kernel: correctly retransmit ADD_ADDR ID 0 2026-05-06 18:16:44 -07:00
pm_netlink.c mptcp: pm: ignore unknown endpoint flags 2025-12-08 23:54:02 -08:00
pm_userspace.c mptcp: pm: rename 'subflows' to 'extra_subflows' 2025-09-26 17:44:04 -07:00
protocol.c mptcp: reset rcv wnd on disconnect 2026-05-19 15:36:35 +02:00
protocol.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-04-09 13:20:59 -07:00
sched.c mptcp: sched: split validation part 2025-04-15 08:21:46 -07:00
sockopt.c mptcp: update window_clamp on subflows when SO_RCVBUF is set 2026-05-19 15:36:35 +02:00
subflow.c mptcp: use MPTCP_RST_EMPTCP for ACK HMAC validation failure 2026-05-04 19:20:50 -07:00
syncookies.c
token.c mptcp: fix kdoc warnings 2026-02-06 20:35:06 -08:00
token_test.c