From nobody Mon Feb 9 11:29:34 2026 Delivered-To: wpasupplicant.patchew@gmail.com Received: by 2002:a05:6638:bd2:0:0:0:0 with SMTP id g18csp2020395jad; Thu, 24 Feb 2022 15:22:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJwLBr0nJ+uEoPtEbXADslqrJ1j7G+OtxBXiMdm4uT9bzeh1j9bphCY+52WYUgQPYA0D6439 X-Received: by 2002:a05:6a00:1503:b0:4e1:d277:cca with SMTP id q3-20020a056a00150300b004e1d2770ccamr5032217pfu.4.1645744955052; Thu, 24 Feb 2022 15:22:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645744955; cv=none; d=google.com; s=arc-20160816; b=FIvv8EzNxzZ1p05cAGgdljrl7X1GZgK92u2a4dqdR2kIkp/YA/wyFtWCJ4r0Dr3zXb k4cGaV+FjkmWCMQX20bmXgqbHS2B61CqzFWlPU0PbJNWrRyFCNMKe0gnfrjZMXTX3TSY VvKXJ1RU+rpbe/WFKRAIfK/BZZt7kl4rW4/Ika9WIOlIniuQCPBsDAZ6sFcRWbDIDT6Z Zve3YSYqBh0cvnKdrRHi8VJPMrMOFt2QIvyqh6bFotMDHk3DD3LkDTdWBE7JcNbCobY9 RdH24KeVT1uzN680SUCXxvG3QyUunB7Lg8Zd2q/jNNRPuHlpO2sBBu1zdnWf27qgRcLN CIdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=CXIb2E5Z4XVxCu4FwtAqY3c/BGnKx2YgFV3j9QWQVLY=; b=pCIPQX2LbuNcNTr30cC42QTX/zHZewb4Ywo1RMO//IayOaiaH4A3kNqds4XFSuyu3r A1GGRdyIDZcQ9XSFOaaLu9EKlo4raxyMeLZDRmLYG1m+BrnHMQeExdsrX7Nzts4JnKgz 6ZXCiHuSgBxb1Ms08kBGgVlezCCHv7oUXYbH8Soh3bGyBzWrQTH36GnhiVbydNQW3o4W c/mefUgKWj7SmN9sisTd+ePZjI3g54xbeMPUBVJdHntY4FkTbHgm4gRrfTIJqAz1n9wV Y5Y6XloBaFJAZwu+a2k/PTOpgeDlERwiMgR2dT1z+WlyQ5KldCfvKPhh4DLHSGFKjMts EHeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ES4bUC9v; spf=pass (google.com: domain of mptcp+bounces-4029-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 147.75.69.165 as permitted sender) smtp.mailfrom="mptcp+bounces-4029-wpasupplicant.patchew=gmail.com@lists.linux.dev"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sjc.edge.kernel.org (sjc.edge.kernel.org. [147.75.69.165]) by mx.google.com with ESMTPS id u2-20020a170903124200b001500760bfcesi380870plh.615.2022.02.24.15.22.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Feb 2022 15:22:35 -0800 (PST) Received-SPF: pass (google.com: domain of mptcp+bounces-4029-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 147.75.69.165 as permitted sender) client-ip=147.75.69.165; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ES4bUC9v; spf=pass (google.com: domain of mptcp+bounces-4029-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 147.75.69.165 as permitted sender) smtp.mailfrom="mptcp+bounces-4029-wpasupplicant.patchew=gmail.com@lists.linux.dev"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sjc.edge.kernel.org (Postfix) with ESMTPS id 75ACD3E0F09 for ; Thu, 24 Feb 2022 23:22:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 66ECF10E4; Thu, 24 Feb 2022 23:22:32 +0000 (UTC) X-Original-To: mptcp@lists.linux.dev Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7966910E1 for ; Thu, 24 Feb 2022 23:22:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645744951; x=1677280951; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jcxPSYB1Zxxid+t+G+YhJEo7aY7Sfx9GM5su9zqZIAU=; b=ES4bUC9vRm0v5UAquUz8X/Br/CsV9k1DeHsg/x0P32itdYargckcVlO6 46GRFXWGBkbp82Ylu/LxM4+X4RTMsGNg334jdkcp7JUvBwHmQGvyJEI97 JSjibmP8okvfaQXAeHznFAgIJIZzU/1OnuFp1AStSl7N7LxQFh3NyP+d8 fyqPRkB2igdX4sivYRtNVEYRBMtUUvHcsMiUMFg81kytkvQRBU+TRENvv +yLi79WqsA9rkLK5qmcuLn0L4f+pnEF3ihKaZH155WCYWFjWZOsdEH1r6 iD2nMBjW/GZhPSAosDq/RmFqUXwzPdNe2tRFjG8kdZpIb3fDHAZZmrnhb A==; X-IronPort-AV: E=McAfee;i="6200,9189,10268"; a="232998399" X-IronPort-AV: E=Sophos;i="5.90,134,1643702400"; d="scan'208";a="232998399" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Feb 2022 15:22:28 -0800 X-IronPort-AV: E=Sophos;i="5.90,134,1643702400"; d="scan'208";a="491784932" Received: from mjmartin-desk2.amr.corp.intel.com (HELO mjmartin-desk2.intel.com) ([10.209.28.67]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Feb 2022 15:22:28 -0800 From: Mat Martineau To: mptcp@lists.linux.dev Cc: Mat Martineau , fw@strlen.de Subject: [RFC PATCH mptcp-next 3/4] tcp: Check for the presence of a MP_JOIN option Date: Thu, 24 Feb 2022 15:22:25 -0800 Message-Id: <20220224232226.259304-4-mathew.j.martineau@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220224232226.259304-1-mathew.j.martineau@linux.intel.com> References: <20220224232226.259304-1-mathew.j.martineau@linux.intel.com> Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add a bit to struct tcp_options_received and set that bit if a MPTCP option with the MP_JOIN subtype is present in a TCP header. Signed-off-by: Mat Martineau --- include/linux/tcp.h | 3 ++- net/ipv4/tcp_input.c | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 1168302b7927..46a14bce8019 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h @@ -93,7 +93,8 @@ struct tcp_options_received { snd_wscale : 4, /* Window scaling received from sender */ rcv_wscale : 4; /* Window scaling to send to receiver */ u8 saw_unknown:1, /* Received unknown option */ - unused:7; + saw_mp_join:1, /* Received MPTCP MP_JOIN */ + unused:6; u8 num_sacks; /* Number of SACK blocks */ u16 user_mss; /* mss requested by user in ioctl */ u16 mss_clamp; /* Maximal mss, negotiated at connection setup */ diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 7eb02f9da3c9..845f0e6906b5 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -4122,6 +4122,14 @@ void tcp_parse_options(const struct net *net, opt_rx->saw_unknown =3D 1; break; =20 + case TCPOPT_MPTCP: + __u8 mptcp_subtype =3D *ptr >> 4; + + if (mptcp_subtype =3D=3D MPTCPOPT_MP_JOIN) + opt_rx->saw_mp_join =3D 1; + + break; + default: opt_rx->saw_unknown =3D 1; } --=20 2.35.1