MPTCP Linux Development
 help / color / mirror / Atom feed
From: Geliang Tang <geliang@kernel.org>
To: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>, mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-net 3/7] mptcp: tfo: record 'deny join id0' info
Date: Sat, 06 Sep 2025 22:05:23 +0800	[thread overview]
Message-ID: <1cdace482b0f833e68c95fad171e4323c1d1925e.camel@kernel.org> (raw)
In-Reply-To: <20250829-mptcp-pm-user-c-flag-v1-3-78b25dda7708@kernel.org>

Hi Matt,

Thanks for this fix.

On Fri, 2025-08-29 at 22:33 +0200, Matthieu Baerts (NGI0) wrote:
> When TFO is used, the check to see if the 'C' flag (deny join id0)
> was
> set was bypassed.
> 
> This flag can be set when TFO is used, so the check should also be
> done
> when TFO is used.
> 
> Fixes: dfc8d0603033 ("mptcp: implement delayed seq generation for
> passive fastopen")
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> ---
>  net/mptcp/options.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/net/mptcp/options.c b/net/mptcp/options.c
> index
> d47b8a9bc2df2f14645b1b3d3e10fea1b38567b1..cf531f2d815cdfbc772b837def6
> e7d558e64d558 100644
> --- a/net/mptcp/options.c
> +++ b/net/mptcp/options.c
> @@ -985,14 +985,14 @@ static bool check_fully_established(struct
> mptcp_sock *msk, struct sock *ssk,
>  		return false;
>  	}
>  
> -	if (mp_opt->deny_join_id0)
> -		WRITE_ONCE(msk->pm.remote_deny_join_id0, true);
> -
>  	if (unlikely(!READ_ONCE(msk->pm.server_side)))
>  		/* DO-NOT-MERGE: use WARN i/o pr_warn: only for
> MPTCP export */
>  		WARN_ONCE(1, "bogus mpc option on established client
> sk");
>  
>  set_fully_established:
> +	if (mp_opt->deny_join_id0)
> +		WRITE_ONCE(msk->pm.remote_deny_join_id0, true);
> +

This set_fully_established label is not only jumped to during TFO but
also in several other scenarios. I think maybe instead of relocating
the deny_join_id0 check code after this label, we should add a new
label before the deny_join_id0 check and jump to the new label only in
the case of TFO.

WDYT?

Thanks,
-Geliang

>  	mptcp_data_lock((struct sock *)msk);
>  	__mptcp_subflow_fully_established(msk, subflow, mp_opt);
>  	mptcp_data_unlock((struct sock *)msk);

  reply	other threads:[~2025-09-06 14:05 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-29 20:33 [PATCH mptcp-net 0/7] mptcp: pm: nl: announce deny-join-id0 attribute Matthieu Baerts (NGI0)
2025-08-29 20:33 ` [PATCH mptcp-net 1/7] mptcp: set remote_deny_join_id0 on SYN recv Matthieu Baerts (NGI0)
2025-08-29 20:33 ` [PATCH mptcp-net 2/7] mptcp: pm: userspace: respect deny_join_id0 attr Matthieu Baerts (NGI0)
2025-08-29 20:54   ` Christoph Paasch
2025-08-30  0:58     ` Mat Martineau
2025-09-01 10:08       ` Matthieu Baerts
2025-09-02 16:43         ` Christoph Paasch
2025-09-02 16:58           ` Matthieu Baerts
2025-08-29 20:33 ` [PATCH mptcp-net 3/7] mptcp: tfo: record 'deny join id0' info Matthieu Baerts (NGI0)
2025-09-06 14:05   ` Geliang Tang [this message]
2025-09-06 14:19     ` Matthieu Baerts
2025-09-10  3:56       ` Geliang Tang
2025-08-29 20:33 ` [PATCH mptcp-net 4/7] netlink: specs: mptcp: fix if-idx attribute type Matthieu Baerts (NGI0)
2025-09-06 14:16   ` Geliang Tang
2025-09-08 17:16     ` Matthieu Baerts
2025-09-06 14:18   ` Geliang Tang
2025-09-06 14:19   ` Geliang Tang
2025-08-29 20:33 ` [PATCH mptcp-net 5/7] doc: mptcp: net.mptcp.pm_type is deprecated Matthieu Baerts (NGI0)
2025-08-29 20:33 ` [PATCH mptcp-net 6/7] selftests: mptcp: shellcheck: support v0.11.0 Matthieu Baerts (NGI0)
2025-08-29 20:33 ` [PATCH RFC mptcp-net 7/7] mptcp: pm: nl: announce deny-join-id0 attribute Matthieu Baerts (NGI0)
2025-09-05  0:54   ` Mat Martineau
2025-09-08 17:17     ` Matthieu Baerts
2025-08-29 23:18 ` [PATCH mptcp-net 0/7] " MPTCP CI
2025-09-08 17:22 ` Matthieu Baerts

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=1cdace482b0f833e68c95fad171e4323c1d1925e.camel@kernel.org \
    --to=geliang@kernel.org \
    --cc=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox