From patchwork Wed Apr 7 00:16:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mat Martineau X-Patchwork-Id: 417265 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D6DEC43460 for ; Wed, 7 Apr 2021 00:17:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EE12E613C0 for ; Wed, 7 Apr 2021 00:17:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347468AbhDGARX (ORCPT ); Tue, 6 Apr 2021 20:17:23 -0400 Received: from mga09.intel.com ([134.134.136.24]:23778 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347481AbhDGAQx (ORCPT ); Tue, 6 Apr 2021 20:16:53 -0400 IronPort-SDR: 3zxEXS7qUP8698XYStxxr3fMd5uaGHF2vd17Zal8Ek4EUmpwdj/a28fm6/zRLpEU6I8buaQZIt HnH++I+T0soA== X-IronPort-AV: E=McAfee;i="6000,8403,9946"; a="193297266" X-IronPort-AV: E=Sophos;i="5.82,201,1613462400"; d="scan'208";a="193297266" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2021 17:16:11 -0700 IronPort-SDR: +45XRN7k6CupY5dHVIK4Sktd0j7lIquZ7WKlJ8tGcWaD42bRlbPLIHNOfOtS2lVxuRv8NJajlt ASJXZJNGQx3Q== X-IronPort-AV: E=Sophos;i="5.82,201,1613462400"; d="scan'208";a="458105206" Received: from mjmartin-desk2.amr.corp.intel.com (HELO mjmartin-desk2.intel.com) ([10.254.115.52]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2021 17:16:11 -0700 From: Mat Martineau To: netdev@vger.kernel.org Cc: Davide Caratti , davem@davemloft.net, kuba@kernel.org, matthieu.baerts@tessares.net, mptcp@lists.linux.dev, Mat Martineau Subject: [PATCH net-next 8/8] mptcp: drop all sub-options except ADD_ADDR when the echo bit is set Date: Tue, 6 Apr 2021 17:16:04 -0700 Message-Id: <20210407001604.85071-9-mathew.j.martineau@linux.intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210407001604.85071-1-mathew.j.martineau@linux.intel.com> References: <20210407001604.85071-1-mathew.j.martineau@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Davide Caratti Current Linux carries echo-ed ADD_ADDR over pure TCP ACKs, so there is no need to add a DSS element that would fit only ADD_ADDR with IPv4 address. Drop the DSS from echo-ed ADD_ADDR, regardless of the IP version. Signed-off-by: Davide Caratti Signed-off-by: Mat Martineau --- net/mptcp/options.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/mptcp/options.c b/net/mptcp/options.c index c7eb61d0564c..d51c3ad54d9a 100644 --- a/net/mptcp/options.c +++ b/net/mptcp/options.c @@ -624,7 +624,8 @@ static bool mptcp_established_options_add_addr(struct sock *sk, struct sk_buff * int len; if ((mptcp_pm_should_add_signal_ipv6(msk) || - mptcp_pm_should_add_signal_port(msk)) && + mptcp_pm_should_add_signal_port(msk) || + mptcp_pm_should_add_signal_echo(msk)) && skb && skb_is_tcp_pure_ack(skb)) { pr_debug("drop other suboptions"); opts->suboptions = 0;