]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
mptcp: sockopt: increase seq in mptcp_setsockopt_all_sf
authorMatthieu Baerts (NGI0) <matttbe@kernel.org>
Fri, 1 May 2026 19:35:37 +0000 (21:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 May 2026 13:31:17 +0000 (15:31 +0200)
commit 70ece9d7021c54cf40c72b31b066e9088f5f75f5 upstream.

mptcp_setsockopt_all_sf() was missing a call to sockopt_seq_inc(). This
is required not to cause missing synchronization for newer subflows
created later on.

This helper is called each time a socket option is set on subflows, and
future ones will need to inherit this option after their creation.

Fixes: 51c5fd09e1b4 ("mptcp: add TCP_MAXSEG sockopt support")
Cc: stable@vger.kernel.org
Suggested-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260501-net-mptcp-misc-fixes-7-1-rc3-v1-4-b70118df778e@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/mptcp/sockopt.c

index 79db15903e7a52aacf81e56e3e2f718ff4a88c43..30b45d2ab38c8a4934fcff8c15c4c28d8482edae 100644 (file)
@@ -812,6 +812,10 @@ static int mptcp_setsockopt_all_sf(struct mptcp_sock *msk, int level,
                if (ret)
                        break;
        }
+
+       if (!ret)
+               sockopt_seq_inc(msk);
+
        return ret;
 }