Skip to content

Commit 88ef794

Browse files
matttbegregkh
authored andcommitted
mptcp: fully established after ADD_ADDR echo on MPJ
commit d67c564 upstream. Before this patch, receiving an ADD_ADDR echo on the just connected MP_JOIN subflow -- initiator side, after the MP_JOIN 3WHS -- was resulting in an MP_RESET. That's because only ACKs with a DSS or ADD_ADDRs without the echo bit were allowed. Not allowing the ADD_ADDR echo after an MP_CAPABLE 3WHS makes sense, as we are not supposed to send an ADD_ADDR before because it requires to be in full established mode first. For the MP_JOIN 3WHS, that's different: the ADD_ADDR can be sent on a previous subflow, and the ADD_ADDR echo can be received on the recently created one. The other peer will already be in fully established, so it is allowed to send that. We can then relax the conditions here to accept the ADD_ADDR echo for MPJ subflows. Fixes: 67b12f7 ("mptcp: full fully established support after ADD_ADDR") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau <martineau@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20240731-upstream-net-20240731-mptcp-endp-subflow-signal-v1-1-c8a9b036493b@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 325609c commit 88ef794

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

net/mptcp/options.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,8 @@ static bool check_fully_established(struct mptcp_sock *msk, struct sock *ssk,
958958

959959
if (subflow->remote_key_valid &&
960960
(((mp_opt->suboptions & OPTION_MPTCP_DSS) && mp_opt->use_ack) ||
961-
((mp_opt->suboptions & OPTION_MPTCP_ADD_ADDR) && !mp_opt->echo))) {
961+
((mp_opt->suboptions & OPTION_MPTCP_ADD_ADDR) &&
962+
(!mp_opt->echo || subflow->mp_join)))) {
962963
/* subflows are fully established as soon as we get any
963964
* additional ack, including ADD_ADDR.
964965
*/

0 commit comments

Comments
 (0)