All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Geliang Tang <geliangtang@gmail.com>, mptcp@lists.linux.dev
Cc: Florian Westphal <fw@strlen.de>
Subject: Re: [MPTCP][PATCH v8 mptcp-next 3/4] mptcp: add deny_join_id0 in mptcp_options_received
Date: Wed, 09 Jun 2021 19:01:18 +0200	[thread overview]
Message-ID: <a0903efe53d0fdf34379cd7313a4a6bec647cff1.camel@redhat.com> (raw)
In-Reply-To: <5111dfce361c87c83e5355e78e55b6f593bac55b.1621933974.git.geliangtang@gmail.com>

Hello,

On Tue, 2021-05-25 at 17:17 +0800, Geliang Tang wrote:
> diff --git a/net/mptcp/options.c b/net/mptcp/options.c
> index 1e921b5103bf..0d30008f0313 100644
> --- a/net/mptcp/options.c
> +++ b/net/mptcp/options.c
> @@ -83,6 +83,9 @@ static void mptcp_parse_option(const struct sk_buff *skb,
>  		if (flags & MPTCP_CAP_CHECKSUM_REQD)
>  			mp_opt->csum_reqd = 1;
>  
> +		if (flags & MPTCP_CAP_DENY_JOIN_ID0)
> +			mp_opt->deny_join_id0 = 1;
> +
>  		mp_opt->mp_capable = 1;
>  		if (opsize >= TCPOLEN_MPTCP_MPC_SYNACK) {
>  			mp_opt->sndr_key = get_unaligned_be64(ptr);
> @@ -360,6 +363,7 @@ void mptcp_get_options(const struct sock *sk,
>  	mp_opt->mp_prio = 0;
>  	mp_opt->reset = 0;
>  	mp_opt->csum_reqd = READ_ONCE(msk->csum_enabled);
> +	mp_opt->deny_join_id0 = 0;
>  
>  	length = (th->doff * 4) - sizeof(struct tcphdr);
>  	ptr = (const unsigned char *)(th + 1);
> @@ -1047,6 +1051,8 @@ void mptcp_incoming_options(struct sock *sk, struct sk_buff *skb)
>  	}
>  
>  	mptcp_get_options(sk, skb, &mp_opt);
> +	if (mp_opt.deny_join_id0)
> +		WRITE_ONCE(msk->pm.remote_deny_join_id0, true);

I'm sorry for the long delay. Overall LGTM. The only thing I see worth
mentioning is the above test: is done for each incoming packet, but we
really need to check it for MPC ACK packet, right? if so the test
should be probably moved into the suitable section of
check_fully_established() - e.g. after the 'if (!mp_opt->mp_capable) {'
block.

No need for a resend, a squash-to patch will suffice  - if my above
assumption is correct.

BTW it looks like there are no check for the C bit being unmodified
between MPC syn and MPC ack, and AFAICS the RFC don't mention that
case. I think/guess we can simply fetch the MPC ack value.

Cheers,

Paolo

p.s. this really means acked-by ;)


  parent reply	other threads:[~2021-06-09 17:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-25  9:17 [MPTCP][PATCH v8 mptcp-next 0/4] add MP_CAPABLE 'C' flag Geliang Tang
2021-05-25  9:17 ` [MPTCP][PATCH v8 mptcp-next 1/4] mptcp: add sysctl allow_join_initial_addr_port Geliang Tang
2021-05-25  9:17   ` [MPTCP][PATCH v8 mptcp-next 2/4] mptcp: add allow_join_id0 in mptcp_out_options Geliang Tang
2021-05-25  9:17     ` [MPTCP][PATCH v8 mptcp-next 3/4] mptcp: add deny_join_id0 in mptcp_options_received Geliang Tang
2021-05-25  9:17       ` [MPTCP][PATCH v8 mptcp-next 4/4] selftests: mptcp: add deny_join_id0 testcases Geliang Tang
2021-06-09 17:01       ` Paolo Abeni [this message]
2021-05-25 22:49 ` [MPTCP][PATCH v8 mptcp-next 0/4] add MP_CAPABLE 'C' flag Mat Martineau
2021-06-11 14:39 ` 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=a0903efe53d0fdf34379cd7313a4a6bec647cff1.camel@redhat.com \
    --to=pabeni@redhat.com \
    --cc=fw@strlen.de \
    --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 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.