From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
To: MPTCP Linux <mptcp@lists.linux.dev>
Cc: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
Subject: [PATCH mptcp-net v2 5/6] selftests: mptcp: join: new ID0 subflow from the right IP
Date: Thu, 06 Aug 2026 10:46:22 +0200 [thread overview]
Message-ID: <20260806-mptcp-pm-userspace-id0-case-v2-5-fea1808e1c57@kernel.org> (raw)
In-Reply-To: <20260806-mptcp-pm-userspace-id0-case-v2-0-fea1808e1c57@kernel.org>
In MPTCP, the local address and port used by the initial subflow has the
ID "0". It means that when this address and port are used for some
operations -- e.g. creating a new subflow -- they should be linked to
the ID0, and no other addresses and ports can get this special ID while
the initial IP address and port is used.
Hence, this is not correct here to try to create a subflow with the ID
"0", but from a different IP address. With the first patch of this
series, this action now returns an error.
Instead of simply using the right IP address, continue to also use the
wrong one to check that the kernel is correctly not allowing the
creation of an ID0 subflow with the wrong IP address.
While at it, fix the dumped address: the initial address is not supposed
to be dumped, similar to what is being done with the in-kernel PM. So no
"extra" addresses should be printed there.
Fixes: b2e2248f365a ("selftests: mptcp: userspace pm create id 0 subflow")
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
tools/testing/selftests/net/mptcp/mptcp_join.sh | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index 2413c832af03..0dc81eeb0636 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -4143,10 +4143,11 @@ userspace_tests()
wait_event ns2 MPTCP_LIB_EVENT_ESTABLISHED 1
chk_mptcp_info subflows 0 subflows 0
chk_subflows_total 1 1
- userspace_pm_add_sf $ns2 10.0.3.2 0
+ # from an IP not linked to ID0: failure expected, no new MPJ
+ userspace_pm_add_sf $ns2 10.0.3.2 0 2>/dev/null
+ userspace_pm_add_sf $ns2 10.0.1.2 0
wait_event ns2 MPTCP_LIB_EVENT_SUB_ESTABLISHED 1
- userspace_pm_chk_dump_addr "${ns2}" \
- "id 0 flags subflow 10.0.3.2" "id 0 subflow"
+ userspace_pm_chk_dump_addr "${ns2}" "" "id 0 subflow"
chk_join_nr 1 1 1
chk_mptcp_info subflows 1 subflows 1
chk_subflows_total 2 2
--
2.53.0
next prev parent reply other threads:[~2026-08-06 8:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-06 8:46 [PATCH mptcp-net v2 0/6] mptcp: pm: userspace: properly deal with the ID0 case Matthieu Baerts (NGI0)
2026-08-06 8:46 ` [PATCH mptcp-net v2 1/6] mptcp: pm: userspace: properly handle " Matthieu Baerts (NGI0)
2026-08-06 8:46 ` [PATCH mptcp-net v2 2/6] mptcp: pm: userspace: allow announcing ID0 addr Matthieu Baerts (NGI0)
2026-08-06 8:46 ` [PATCH mptcp-net v2 3/6] mptcp: pm: userspace: no ID0 exception for RM_ADDR Matthieu Baerts (NGI0)
2026-08-06 8:46 ` [PATCH mptcp-net v2 4/6] mptcp: pm: userspace: don't dump initial ID0 Matthieu Baerts (NGI0)
2026-08-06 8:46 ` Matthieu Baerts (NGI0) [this message]
2026-08-06 8:46 ` [PATCH mptcp-net v2 6/6] mptcp: pm: restrict in-kernel worker actions to this PM Matthieu Baerts (NGI0)
2026-08-06 10:00 ` [PATCH mptcp-net v2 0/6] mptcp: pm: userspace: properly deal with the ID0 case MPTCP CI
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260806-mptcp-pm-userspace-id0-case-v2-5-fea1808e1c57@kernel.org \
--to=matttbe@kernel.org \
--cc=mptcp@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.