mptcp.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Mat Martineau <mathew.j.martineau@linux.intel.com>
To: Geliang Tang <geliangtang@gmail.com>
Cc: mptcp@lists.linux.dev
Subject: Re: [MPTCP][PATCH mptcp-next] Squash to "mptcp: add deny_join_id0 in mptcp_options_received"
Date: Tue, 18 May 2021 14:41:17 -0700 (PDT)	[thread overview]
Message-ID: <fecc3c1-5ac1-5ce7-7c8-8f253c619bb2@linux.intel.com> (raw)
In-Reply-To: <b49f8eb27abe177f54ea8d7b746ba02003d49682.1621332197.git.geliangtang@gmail.com>

On Tue, 18 May 2021, Geliang Tang wrote:

> Please add this line to the commit log:
>
> '''
> In mptcp_finish_join, add the incomming join address check too.
> '''
>
> Signed-off-by: Geliang Tang <geliangtang@gmail.com>
> ---
> net/mptcp/protocol.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index c725e8f02533..5cebecc838ca 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
> @@ -3116,7 +3116,8 @@ bool mptcp_finish_join(struct sock *ssk)
> 	if (!msk->pm.server_side)
> 		goto out;
>
> -	if (!mptcp_pm_allow_new_subflow(msk)) {
> +	if (!mptcp_pm_allow_new_subflow(msk) ||
> +	    (READ_ONCE(msk->pm.remote_deny_join_id0) && !subflow->remote_id)) {

This checks whether this side received a C==1 bit from the remote - but 
that's already checked in mptcp_pm_create_subflow_or_signal_addr().

What might be needed is a check in the opposite direction: if this side 
*sent* C==1, and the incoming MP_JOIN is for the initial addr/port, that's 
invalid.

Not sure yet how we are going to interpret the RFC on this, will be 
discussing at the meeting tomorrow.


> 		subflow->reset_reason = MPTCP_RST_EPROHIBIT;
> 		return false;
> 	}
> -- 
> 2.31.1

--
Mat Martineau
Intel

  parent reply	other threads:[~2021-05-18 21:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-18 10:05 [MPTCP][PATCH mptcp-next] Squash to "mptcp: add deny_join_id0 in mptcp_options_received" Geliang Tang
2021-05-18 10:05 ` [MPTCP][PATCH mptcp-next] Squash to "selftests: mptcp: add deny_join_id0 testcases" Geliang Tang
2021-05-20 22:59   ` Mat Martineau
2021-05-18 21:41 ` Mat Martineau [this message]
2021-05-19  3:18   ` [MPTCP][PATCH mptcp-next] Squash to "mptcp: add deny_join_id0 in mptcp_options_received" Mat Martineau
2021-06-10  9:13 Geliang Tang
2021-06-10 21:30 ` Mat Martineau

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=fecc3c1-5ac1-5ce7-7c8-8f253c619bb2@linux.intel.com \
    --to=mathew.j.martineau@linux.intel.com \
    --cc=geliangtang@gmail.com \
    --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;
as well as URLs for NNTP newsgroup(s).