]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
mptcp: pm: kernel: reset fullmesh counter after flush
authorMatthieu Baerts (NGI0) <matttbe@kernel.org>
Mon, 27 Apr 2026 19:54:36 +0000 (21:54 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 29 Apr 2026 01:36:27 +0000 (18:36 -0700)
This variable counts how many MPTCP endpoints have a 'fullmesh' flag
set. After having flushed all MPTCP endpoints, it is then needed to
reset this counter.

Without this reset, this counter exposed to the userspace is wrong, but
also non-fullmesh endpoints added after the flush will not be taken into
account to create subflows in reaction to ADD_ADDRs.

Fixes: f88191c7f361 ("mptcp: pm: in-kernel: record fullmesh endp nb")
Cc: stable@vger.kernel.org
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/patchset/20260422-mptcp-inc-limits-v6-0-903181771530%40kernel.org?part=15
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260427-net-mptcp-misc-fixes-7-1-rc2-v1-4-7432b7f279fa@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/pm_kernel.c

index 0ebf43be9939935de95121099acc7f2aa80ddf6c..c9f1e5af3cd3ec085d338d964909d14f1f31c07a 100644 (file)
@@ -1278,6 +1278,7 @@ static void __reset_counters(struct pm_nl_pernet *pernet)
        WRITE_ONCE(pernet->endp_signal_max, 0);
        WRITE_ONCE(pernet->endp_subflow_max, 0);
        WRITE_ONCE(pernet->endp_laminar_max, 0);
+       WRITE_ONCE(pernet->endp_fullmesh_max, 0);
        pernet->endpoints = 0;
 }