Skip to content

Commit ec87dd6

Browse files
matttbegregkh
authored andcommitted
selftests: mptcp: join: test both signal & subflow
commit 4d2868b upstream. It should be quite uncommon to set both the subflow and the signal flags: the initiator of the connection is typically the one creating new subflows, not the other peer, then no need to announce additional local addresses, and use it to create subflows. But some people might be confused about the flags, and set both "just to be sure at least the right one is set". To verify the previous fix, and avoid future regressions, this specific case is now validated: the client announces a new address, and initiates a new subflow from the same address. While working on this, another bug has been noticed, where the client reset the new subflow because an ADD_ADDR echo got received as the 3rd ACK: this new test also explicitly checks that no RST have been sent by the client and server. The 'Fixes' tag here below is the same as the one from the previous commit: this patch here is not fixing anything wrong in the selftests, but it validates the previous fix for an issue introduced by this commit ID. Fixes: 86e39e0 ("mptcp: keep track of local endpoint still available for each msk") 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-7-c8a9b036493b@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent aedbd14 commit ec87dd6

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

tools/testing/selftests/net/mptcp/mptcp_join.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1989,6 +1989,21 @@ signal_address_tests()
19891989
chk_add_nr 1 1
19901990
fi
19911991

1992+
# uncommon: subflow and signal flags on the same endpoint
1993+
# or because the user wrongly picked both, but still expects the client
1994+
# to create additional subflows
1995+
if reset "subflow and signal together"; then
1996+
pm_nl_set_limits $ns1 0 2
1997+
pm_nl_set_limits $ns2 0 2
1998+
pm_nl_add_endpoint $ns2 10.0.3.2 flags signal,subflow
1999+
run_tests $ns1 $ns2 10.0.1.1
2000+
chk_join_nr 1 1 1
2001+
chk_add_nr 1 1 0 invert # only initiated by ns2
2002+
chk_add_nr 0 0 0 # none initiated by ns1
2003+
chk_rst_nr 0 0 invert # no RST sent by the client
2004+
chk_rst_nr 0 0 # no RST sent by the server
2005+
fi
2006+
19922007
# accept and use add_addr with additional subflows
19932008
if reset "multiple subflows and signal"; then
19942009
pm_nl_set_limits $ns1 0 3

0 commit comments

Comments
 (0)