mptcp: fix ack generation for fallback msk
authorPaolo Abeni <pabeni@redhat.com>
Tue, 18 Nov 2025 07:20:19 +0000 (08:20 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 20 Nov 2025 04:07:14 +0000 (20:07 -0800)
commit5e15395f6d9ec07395866c5511f4b4ac566c0c9b
treedfb0b5299153cc274bc4f8e7d116a2a6f8643de4
parente31a11be41cd134f245c01d1329e7bc89aba78fb
mptcp: fix ack generation for fallback msk

mptcp_cleanup_rbuf() needs to know the last most recent, mptcp-level
rcv_wnd sent, and such information is tracked into the msk->old_wspace
field, updated at ack transmission time by mptcp_write_options().

Fallback socket do not add any mptcp options, such helper is never
invoked, and msk->old_wspace value remain stale. That in turn makes
ack generation at recvmsg() time quite random.

Address the issue ensuring mptcp_write_options() is invoked even for
fallback sockets, and just update the needed info in such a case.

The issue went unnoticed for a long time, as mptcp currently overshots
the fallback socket receive buffer autotune significantly. It is going
to change in the near future.

Fixes: e3859603ba13 ("mptcp: better msk receive window updates")
Cc: stable@vger.kernel.org
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/594
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Geliang Tang <geliang@kernel.org>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20251118-net-mptcp-misc-fixes-6-18-rc6-v1-1-806d3781c95f@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/options.c