[PATCH mptcp-net 1/4] Squash to "mptcp: avoid combining some incoming suboptions"
"Matthieu Baerts (NGI0)" <[email protected]> Fri, 31 Jul 2026 15:35:35 +0200
| Newsgroups | dev.linux.lists.mptcp |
|---|---|
| Message-ID | <[email protected]> |
Another stack could send a FASTCLOSE on a plain ACK, with a DSS. That's when they follow the "Option A" [1], while here, the "Option B" is implemented on the sent side. So we need to allow that, and this seems to be handled by the stack in mptcp_incoming_options(). Note: this note should be added in the commit message: Note that now, combining both an MP_CAPABLE and an MP_JOIN will no longer result to a reject of the two options, but only the second one. That seems OK to do that for this unexpected error. At least now all inconsistent combinations are handled the same way. This could change later. Link: https://www.rfc-editor.org/rfc/rfc8684.html#section-3.5-5.1 Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> --- net/mptcp/options.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/net/mptcp/options.c b/net/mptcp/options.c index d6b009319839..5611de38f4d9 100644 --- a/net/mptcp/options.c +++ b/net/mptcp/options.c @@ -170,6 +170,7 @@ static void mptcp_parse_option(const struct sk_buff *skb, if ((mp_opt->suboptions & ~(OPTION_MPTCP_ADD_ADDR | OPTION_MPTCP_RM_ADDR | OPTION_MPTCP_PRIO | + OPTION_MPTCP_FASTCLOSE | OPTION_MPTCP_FAIL)) != 0) break; @@ -357,8 +358,9 @@ static void mptcp_parse_option(const struct sk_buff *skb, break; case MPTCPOPT_MP_FASTCLOSE: - /* Can be used only with RST */ - if ((mp_opt->suboptions & ~OPTION_MPTCP_RST) != 0) + /* Can be used with a restricted number of other options */ + if ((mp_opt->suboptions & ~(OPTIONS_MPTCP_DSS | + OPTION_MPTCP_RST)) != 0) break; if (opsize != TCPOLEN_MPTCP_FASTCLOSE) @@ -1478,7 +1480,7 @@ void mptcp_write_options(struct tcphdr *th, __be32 *ptr, struct tcp_sock *tp, * RM | C | C | C | P |------|------|------|------| * PRIO | X | C | C | C | C |------|------|------| * FAIL | X | X | C | X | X | X |------|------| - * FC | X | X | X | X | X | X | X |------| + * FC | X | X | P | X | X | X | X |------| * RST | X | X | X | X | X | X | O | O | * ------|------|------|------|------|------|------|------|------| * -- 2.53.0