From patchwork Mon Nov 11 16:53:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Abeni X-Patchwork-Id: 1193023 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.01.org (client-ip=2001:19d0:306:5::1; helo=ml01.01.org; envelope-from=mptcp-bounces@lists.01.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="EPKlukLP"; dkim-atps=neutral Received: from ml01.01.org (ml01.01.org [IPv6:2001:19d0:306:5::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47BcS91RWBz9sPk for ; Tue, 12 Nov 2019 03:55:04 +1100 (AEDT) Received: from new-ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id D6B3A100EA52C; Mon, 11 Nov 2019 08:56:54 -0800 (PST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=205.139.110.120; helo=us-smtp-1.mimecast.com; envelope-from=pabeni@redhat.com; receiver= Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 75D7C100EA63E for ; Mon, 11 Nov 2019 08:56:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573491298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ejw6Uh0JK9sflJ++h6usFGR1bbe6V8Rb0TnHVMZCC80=; b=EPKlukLPHDzPcskSskjIMFfbOF6Kv0mL6zD7s/nC1+ayWdJuEOoDd7S8m3kc9Cq4mvLDji /n/IK0PPGNELYZb0QB/mwOZhOjm4037zs6J8N+JOR99/JXshnVsM6jyjBr9JMs2Pl6O7s9 j0krW7QZ/9d/B3M+bTmP698rp+QkjV8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-44-8E-hHAVHOX6jG9GFw3RARw-1; Mon, 11 Nov 2019 11:54:56 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E989C800D49 for ; Mon, 11 Nov 2019 16:54:55 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-117-119.ams2.redhat.com [10.36.117.119]) by smtp.corp.redhat.com (Postfix) with ESMTP id 60E971823C for ; Mon, 11 Nov 2019 16:54:55 +0000 (UTC) From: Paolo Abeni To: mptcp@lists.01.org Date: Mon, 11 Nov 2019 17:53:50 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: 8E-hHAVHOX6jG9GFw3RARw-1 X-Mimecast-Spam-Score: 0 Message-ID-Hash: SJEBHEKN3WXFFJZB6ZZQKN5Q2ISHFEEA X-Message-ID-Hash: SJEBHEKN3WXFFJZB6ZZQKN5Q2ISHFEEA X-MailFrom: pabeni@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.1.1 Precedence: list Subject: [MPTCP] [PATCH 1/4] mptcp: move mp_capable initialization at subflow_init_req() start List-Id: Discussions regarding MPTCP upstreaming Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: This will avoid moving the code in later patch and makes disabling with md5 easier Squash-to: "mptcp: Create SUBFLOW socket for incoming connections" Signed-off-by: Paolo Abeni --- net/mptcp/subflow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c index 869010587df4..9b56fe9a83f2 100644 --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@ -28,6 +28,8 @@ static void subflow_init_req(struct request_sock *req, memset(&rx_opt.mptcp, 0, sizeof(rx_opt.mptcp)); mptcp_get_options(skb, &rx_opt); + subflow_req->mp_capable = 0; + if (rx_opt.mptcp.mp_capable && listener->request_mptcp) { subflow_req->mp_capable = 1; if (rx_opt.mptcp.version >= listener->request_version) @@ -35,8 +37,6 @@ static void subflow_init_req(struct request_sock *req, else subflow_req->version = rx_opt.mptcp.version; subflow_req->remote_key = rx_opt.mptcp.sndr_key; - } else { - subflow_req->mp_capable = 0; } } From patchwork Mon Nov 11 16:53:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Abeni X-Patchwork-Id: 1193025 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.01.org (client-ip=198.145.21.10; helo=ml01.01.org; envelope-from=mptcp-bounces@lists.01.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="SU5S/+Gk"; dkim-atps=neutral Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47BcS93Czvz9sQp for ; Tue, 12 Nov 2019 03:55:05 +1100 (AEDT) Received: from new-ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 0CE2A100EA545; Mon, 11 Nov 2019 08:56:57 -0800 (PST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=205.139.110.61; helo=us-smtp-delivery-1.mimecast.com; envelope-from=pabeni@redhat.com; receiver= Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5FE20100EA535 for ; Mon, 11 Nov 2019 08:56:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573491300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Y3wxf2wPKTFHiA+JPOtYHMju+0LyNdJ06Yda4Kj/1io=; b=SU5S/+GkgU52In1WVbkFmnJUNGd/K/EYi6jS0YRbBjpavPKv2he1WEt+ZaJFVid1bcZrap gL9kfp9eV8JL1QevN5tgo9tIFUsAQjBUETS/nKQXvsYKSNueBBjQhdY5Wiubqkl0sIxED0 23Z1BVHfi6FYeVaLRBma/akoAZhxcEM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-74-izkjhJHNMyKoOCWbU5G_2g-1; Mon, 11 Nov 2019 11:54:57 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C9E371800D48 for ; Mon, 11 Nov 2019 16:54:56 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-117-119.ams2.redhat.com [10.36.117.119]) by smtp.corp.redhat.com (Postfix) with ESMTP id 453E51823C for ; Mon, 11 Nov 2019 16:54:56 +0000 (UTC) From: Paolo Abeni To: mptcp@lists.01.org Date: Mon, 11 Nov 2019 17:53:51 +0100 Message-Id: <4efc3c8a58dc8e50c533b262860a63010b8babbd.1573488743.git.pabeni@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: izkjhJHNMyKoOCWbU5G_2g-1 X-Mimecast-Spam-Score: 0 Message-ID-Hash: 22SFPFJZCW56JSXLGVP7VBFFCQALO5BL X-Message-ID-Hash: 22SFPFJZCW56JSXLGVP7VBFFCQALO5BL X-MailFrom: pabeni@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.1.1 Precedence: list Subject: [MPTCP] [PATCH 2/4] mptcp: disable on req sk if MD5SIG is enabled List-Id: Discussions regarding MPTCP upstreaming Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Likley we want to update the "mptcp: Create SUBFLOW socket for incoming connections" commit message with something alike: Explicitly disable MPTCP if MD5SIG is enable, to prevent TCP option space exaustion. Squash-to: mptcp: Create SUBFLOW socket for incoming connections Signed-off-by: Paolo Abeni --- net/mptcp/protocol.c | 8 ++++++++ net/mptcp/subflow.c | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 81b7c21f4d3c..bb297e9dd6c5 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -342,6 +342,14 @@ static int mptcp_stream_connect(struct socket *sock, struct sockaddr *uaddr, if (IS_ERR(ssock)) return PTR_ERR(ssock); +#ifdef CONFIG_TCP_MD5SIG + /* no MPTCP is MD5SIG is enabled on this socket or we may run out of + * TCP option space. + */ + if (rcu_access_pointer(tcp_sk(ssock->sk)->md5sig_info)) + mptcp_subflow_ctx(ssock->sk)->request_mptcp = 0; +#endif + err = ssock->ops->connect(ssock, uaddr, addr_len, flags); sock_put(ssock->sk); return err; diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c index 9b56fe9a83f2..4ab751163965 100644 --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@ -30,6 +30,14 @@ static void subflow_init_req(struct request_sock *req, subflow_req->mp_capable = 0; +#ifdef CONFIG_TCP_MD5SIG + /* no MPTCP is MD5SIG is enabled on this socket or we may run out of + * TCP option space. + */ + if (rcu_access_pointer(tcp_sk(sk_listener)->md5sig_info)) + return; +#endif + if (rx_opt.mptcp.mp_capable && listener->request_mptcp) { subflow_req->mp_capable = 1; if (rx_opt.mptcp.version >= listener->request_version) From patchwork Mon Nov 11 16:53:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Abeni X-Patchwork-Id: 1193024 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.01.org (client-ip=198.145.21.10; helo=ml01.01.org; envelope-from=mptcp-bounces@lists.01.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="DEZyED0R"; dkim-atps=neutral Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47BcS92wt4z9sPn for ; Tue, 12 Nov 2019 03:55:04 +1100 (AEDT) Received: from new-ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id DE77F100EA535; Mon, 11 Nov 2019 08:56:55 -0800 (PST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=207.211.31.81; helo=us-smtp-delivery-1.mimecast.com; envelope-from=pabeni@redhat.com; receiver= Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 083D4100EA63E for ; Mon, 11 Nov 2019 08:56:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573491299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Xbzn0/Ng0jOjEY9JjSYRFcYEGYe+4RDZ2MqSkXviV4Y=; b=DEZyED0R0yCVyfQd2I/BvmBw2iG/F3NEgt9XLBsSviTAr57wGFPzr+FNmLBlAKTcdkquCM oLBno1rzG/Of0nvdnMlLwY/XHzATlg4OJDvdohBVENSOrVNS1JGvx2ax8lqSKPL20Gw6KU 5qSju2ZZ9dLEegSEcbX5DUWsLNgIv4E= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-103-OUbbHEaBNSOrDMwFB2028A-1; Mon, 11 Nov 2019 11:54:58 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AEA76911E9 for ; Mon, 11 Nov 2019 16:54:57 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-117-119.ams2.redhat.com [10.36.117.119]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2782B1823C for ; Mon, 11 Nov 2019 16:54:56 +0000 (UTC) From: Paolo Abeni To: mptcp@lists.01.org Date: Mon, 11 Nov 2019 17:53:52 +0100 Message-Id: <5a6b5f4f58d6bf3bd425ed0162ac177643d734f3.1573488751.git.pabeni@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: OUbbHEaBNSOrDMwFB2028A-1 X-Mimecast-Spam-Score: 0 Message-ID-Hash: IBIS2ER3GPQXFURVDOB4IEQCCBO4OQXO X-Message-ID-Hash: IBIS2ER3GPQXFURVDOB4IEQCCBO4OQXO X-MailFrom: pabeni@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.1.1 Precedence: list Subject: [MPTCP] [PATCH 3/4] mptcp: warn once if exceeding tcp opt space for dss/mp_capable List-Id: Discussions regarding MPTCP upstreaming Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: since such option will always fit the tcp header, module bugs. Note that this patch preserve a bool ret value for mptcp_established_options_dss(), even if it now always returns true. That will simplify a bit later patches for v1 support. Squash-to: "mptcp: Write MPTCP DSS headers to outgoing data packets" Signed-off-by: Paolo Abeni --- net/mptcp/options.c | 71 ++++++++++++++++++++------------------------- 1 file changed, 31 insertions(+), 40 deletions(-) diff --git a/net/mptcp/options.c b/net/mptcp/options.c index fa10086b5b74..cd16baea0666 100644 --- a/net/mptcp/options.c +++ b/net/mptcp/options.c @@ -200,7 +200,7 @@ static bool mptcp_established_options_mp(struct sock *sk, unsigned int *size, { struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk); - if (!subflow->fourth_ack && remaining >= TCPOLEN_MPTCP_MPC_ACK) { + if (!subflow->fourth_ack) { opts->suboptions = OPTION_MPTCP_MPC_ACK; opts->sndr_key = subflow->local_key; opts->rcvr_key = subflow->remote_key; @@ -220,6 +220,7 @@ static bool mptcp_established_options_dss(struct sock *sk, struct sk_buff *skb, { unsigned int dss_size = 0; struct mptcp_ext *mpext; + struct mptcp_sock *msk; unsigned int ack_size; mpext = skb ? mptcp_get_ext(skb) : NULL; @@ -229,15 +230,10 @@ static bool mptcp_established_options_dss(struct sock *sk, struct sk_buff *skb, map_size = TCPOLEN_MPTCP_DSS_BASE + TCPOLEN_MPTCP_DSS_MAP64; - if (map_size <= remaining) { - remaining -= map_size; - dss_size = map_size; - if (mpext) - opts->ext_copy = *mpext; - } else { - opts->ext_copy.use_map = 0; - WARN_ONCE(1, "MPTCP: Map dropped"); - } + remaining -= map_size; + dss_size = map_size; + if (mpext) + opts->ext_copy = *mpext; } ack_size = TCPOLEN_MPTCP_DSS_ACK64; @@ -246,29 +242,19 @@ static bool mptcp_established_options_dss(struct sock *sk, struct sk_buff *skb, if (dss_size == 0) ack_size += TCPOLEN_MPTCP_DSS_BASE; - if (ack_size <= remaining) { - struct mptcp_sock *msk; - - dss_size += ack_size; - - msk = mptcp_sk(mptcp_subflow_ctx(sk)->conn); - if (msk) { - opts->ext_copy.data_ack = msk->ack_seq; - } else { - mptcp_crypto_key_sha1(mptcp_subflow_ctx(sk)->remote_key, - NULL, &opts->ext_copy.data_ack); - opts->ext_copy.data_ack++; - } + dss_size += ack_size; - opts->ext_copy.ack64 = 1; - opts->ext_copy.use_ack = 1; + msk = mptcp_sk(mptcp_subflow_ctx(sk)->conn); + if (msk) { + opts->ext_copy.data_ack = msk->ack_seq; } else { - opts->ext_copy.use_ack = 0; - WARN(1, "MPTCP: Ack dropped"); + mptcp_crypto_key_sha1(mptcp_subflow_ctx(sk)->remote_key, + NULL, &opts->ext_copy.data_ack); + opts->ext_copy.data_ack++; } - if (!dss_size) - return false; + opts->ext_copy.ack64 = 1; + opts->ext_copy.use_ack = 1; *size = ALIGN(dss_size, 4); return true; @@ -279,22 +265,27 @@ bool mptcp_established_options(struct sock *sk, struct sk_buff *skb, struct mptcp_out_options *opts) { unsigned int opt_size = 0; + bool ret = true; if (!mptcp_subflow_ctx(sk)->mp_capable) return false; - if (mptcp_established_options_mp(sk, &opt_size, remaining, opts)) { - *size += opt_size; - remaining -= opt_size; - return true; - } else if (mptcp_established_options_dss(sk, skb, &opt_size, remaining, - opts)) { - *size += opt_size; - remaining -= opt_size; - return true; - } + if (mptcp_established_options_mp(sk, &opt_size, remaining, opts)) + ret = true; + else if (mptcp_established_options_dss(sk, skb, &opt_size, remaining, + opts)) + ret = true; - return false; + /* we reserved enough space for the above options, and exceeding the + * TCP option space would be fatal + */ + if (WARN_ON_ONCE(opt_size > remaining)) + return false; + + *size += opt_size; + remaining -= opt_size; + + return ret; } bool mptcp_synack_options(const struct request_sock *req, unsigned int *size, From patchwork Mon Nov 11 16:53:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Abeni X-Patchwork-Id: 1193026 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.01.org (client-ip=2001:19d0:306:5::1; helo=ml01.01.org; envelope-from=mptcp-bounces@lists.01.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="QL7ncfPH"; dkim-atps=neutral Received: from ml01.01.org (ml01.01.org [IPv6:2001:19d0:306:5::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47BcS945Pcz9sR4 for ; Tue, 12 Nov 2019 03:55:05 +1100 (AEDT) Received: from new-ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 15A45100EA554; Mon, 11 Nov 2019 08:56:57 -0800 (PST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=205.139.110.120; helo=us-smtp-1.mimecast.com; envelope-from=pabeni@redhat.com; receiver= Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 7552D100EA53E for ; Mon, 11 Nov 2019 08:56:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573491300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BdEr6nMeqbps4Hxi+GKdUarkzn/bvDe2uYI19dg8kMo=; b=QL7ncfPHKIxhdF6SR1khOItTEV2uCggXCt6eVFFhuDCulZdOFrKU8lBiLUJywGxd6ouDxX jnhqTLxgeQFw9JU65ueH+vwSB3eCioAchkhPy1vzDhswdpc1terY7jsQ4pbe9h2+ElqNxq te0qUTl2Dln6MWq/AsEdh1m1AyzwG5g= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-50-XogxxhuzP9O58jVf-QC0sQ-1; Mon, 11 Nov 2019 11:54:59 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 930541005500 for ; Mon, 11 Nov 2019 16:54:58 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-117-119.ams2.redhat.com [10.36.117.119]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0B1C718B91 for ; Mon, 11 Nov 2019 16:54:57 +0000 (UTC) From: Paolo Abeni To: mptcp@lists.01.org Date: Mon, 11 Nov 2019 17:53:53 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: XogxxhuzP9O58jVf-QC0sQ-1 X-Mimecast-Spam-Score: 0 Message-ID-Hash: GLGM4IDN4NVVCFX7Y4FU7XG4J5VSSXCU X-Message-ID-Hash: GLGM4IDN4NVVCFX7Y4FU7XG4J5VSSXCU X-MailFrom: pabeni@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.1.1 Precedence: list Subject: [MPTCP] [PATCH 4/4] mptcp: remove unneeded check in mptcp_established_options_mp() List-Id: Discussions regarding MPTCP upstreaming Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: we now have centralized check in mptcp_established_options() Squash-to: "mptcp: Add handling of outgoing MP_JOIN requests" Signed-off-by: Paolo Abeni --- net/mptcp/options.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/mptcp/options.c b/net/mptcp/options.c index e0c6a3b98544..9080a5fed918 100644 --- a/net/mptcp/options.c +++ b/net/mptcp/options.c @@ -371,8 +371,7 @@ static bool mptcp_established_options_mp(struct sock *sk, unsigned int *size, pr_debug("subflow=%p, local_key=%llu, remote_key=%llu", subflow, subflow->local_key, subflow->remote_key); return true; - } else if (subflow->mp_join && !subflow->fourth_ack && - remaining >= TCPOLEN_MPTCP_MPJ_ACK) { + } else if (subflow->mp_join && !subflow->fourth_ack) { opts->suboptions = OPTION_MPTCP_MPJ_ACK; memcpy(opts->hmac, subflow->hmac, MPTCPOPT_HMAC_LEN); *size = TCPOLEN_MPTCP_MPJ_ACK;