All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw at strlen.de>
To: mptcp at lists.01.org
Subject: [MPTCP] Re: [RFC PATCH 1/4] Squash-to: "mptcp: Handle MP_CAPABLE options for outgoing connections"
Date: Sat, 21 Dec 2019 02:05:51 +0100	[thread overview]
Message-ID: <20191221010551.GE795@breakpoint.cc> (raw)
In-Reply-To: a91929d1327d846a715ef6655311acae49285ae5.1576867317.git.pabeni@redhat.com

[-- Attachment #1: Type: text/plain, Size: 687 bytes --]

Paolo Abeni <pabeni(a)redhat.com> wrote:
> --- a/net/mptcp/subflow.c
> +++ b/net/mptcp/subflow.c
> @@ -262,23 +262,19 @@ static void subflow_ulp_clone(const struct request_sock *req,
>  	struct mptcp_subflow_context *old_ctx = mptcp_subflow_ctx(newsk);
>  	struct mptcp_subflow_context *new_ctx;
>  
> -	/* newsk->sk_socket is NULL at this point */
> -	new_ctx = subflow_create_ctx(newsk, priority);
> -	if (!new_ctx)
> +	if (!subflow_req->mp_capable ||
> +	    (new_ctx = subflow_create_ctx(newsk, priority)) == NULL) {
> +		tcp_sk(newsk)->is_mptcp = 0;
>  		return;
> +	}

I would prefer to avoid assignment inside a conditional.

Otherwise change looks useful to me.

             reply	other threads:[~2019-12-21  1:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-21  1:05 Florian Westphal [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-01-03 18:29 [MPTCP] Re: [RFC PATCH 1/4] Squash-to: "mptcp: Handle MP_CAPABLE options for outgoing connections" Paolo Abeni
2019-12-20 21:43 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=20191221010551.GE795@breakpoint.cc \
    --to=unknown@example.com \
    /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.