From nobody Thu Sep 18 06:46:30 2025 Delivered-To: wpasupplicant.patchew@gmail.com Received: by 2002:a9f:3042:0:0:0:0:0 with SMTP id i2csp722uab; Wed, 8 Jun 2022 12:20:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx416h5HMJ6lhCj+NAQnSxYNXeDVYJRkHpjkzdzCJuezcJoH1N7zchv6meejrz28UlE+bOj X-Received: by 2002:a05:6830:1e64:b0:60b:1b79:836b with SMTP id m4-20020a0568301e6400b0060b1b79836bmr14617860otr.202.1654716033968; Wed, 08 Jun 2022 12:20:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654716033; cv=none; d=google.com; s=arc-20160816; b=ZsFKgIiJ5i/hL5esTzdZCDL4llfDqUltIsDU7rWHRqe7wMoeCQGYEL2EIgblhYsass is7OhGf/QbCTj/hars5EHkkRdhydMUjoyqwJ/aYR6E/Fdd9O5P5Y8iZ6PxD4GIkpA1Mj 7yplRdvT2N+ciPxiXuOmv+e8Zs7NZaWoMqzphG72zxiobJ9f7R4yScBaUBHogYfybSHM IZebo33t5jftwgmiM/4ijH5MSyk7CrPCyBJwqBhW/npGYYemx1k8v9/DnsRwVWJ+T0BG VQSQm2oGC6lPD5UCa4UQiu/QConTW3fVIxveQ1Altudxdp/oHP/Rw3RtuJT6qkwVy/+L Vqqg== 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=V5zSey5INsIVZie2oKyr0FNnoDN3v8CPvFvqFV3qbHQ=; b=MtMp4LOjDsZECqfjm3XCNX+TZ50CO+FkZh3i7xiWTeGCA3JiG2adbLslJV/ZCabhfJ Rzq9FVflpxpUzhLWAf9LaAwDpm1ekdrT8aaX72orAtwgVE8CoP597IgRiuMKkLWkQNv5 Pjrojpx8gui/2P9nCqNJPUdkwunoT7SAMkATcjOH080JohG755Bz+yRi06l4HHovrCdh CeAHWi1U3NPuibYA08eiWrAK8lxbCzxfkfq1RxtphLHTbv2WAWjmicgK248Khg/x5LH8 auJownyUQKXYhEByi7elEipN7XRXlISZVACkPCBzkXJN2qXbJJUPjVtDzD25oWYWfHBb RZOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=IRE3XNYh; spf=pass (google.com: domain of mptcp+bounces-5597-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 139.178.84.19 as permitted sender) smtp.mailfrom="mptcp+bounces-5597-wpasupplicant.patchew=gmail.com@lists.linux.dev"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from da.mirrors.kernel.org (da.mirrors.kernel.org. [139.178.84.19]) by mx.google.com with ESMTPS id z65-20020a9d24c7000000b0060bf5d8e20asi11047158ota.128.2022.06.08.12.20.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Jun 2022 12:20:33 -0700 (PDT) Received-SPF: pass (google.com: domain of mptcp+bounces-5597-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 139.178.84.19 as permitted sender) client-ip=139.178.84.19; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=IRE3XNYh; spf=pass (google.com: domain of mptcp+bounces-5597-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 139.178.84.19 as permitted sender) smtp.mailfrom="mptcp+bounces-5597-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 da.mirrors.kernel.org (Postfix) with ESMTPS id 351A22E09FA for ; Wed, 8 Jun 2022 19:19:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0846B33DE; Wed, 8 Jun 2022 19:19:33 +0000 (UTC) X-Original-To: mptcp@lists.linux.dev Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 68B9933D3 for ; Wed, 8 Jun 2022 19:19: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=1654715971; x=1686251971; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=BQQdLKEaLaTl/b8/Z9nSyx946gsulvh5RHu3JZjqrns=; b=IRE3XNYhWsYMr5niS9oA7kTAnBaJEIZOSuiojsqKaUl9RWGIooWGETcL DHfoLJsfhy0ph97xrEXc4nor6ngD4S7Xnskv5uQCjdJYi3BP6uthbC5xG VdeFTHHMtpJ6t8QORzkV4kzIpMsR/D2LFEKLMwpwLxTymLJS9y9mawuo6 dtdam0nJjWAXV6wNqGhRN2t/fba/DZM6TaVi6f/7S8Kr5kRDeu0gDXTy1 AvdIid0uc+3BJ+BDc0H8XoIXgPa1YElq6qitgEA8kxvNWoKfkikNKWNwy mg3/or725+ZdED2vPausLqM/5gh6SC6hdeohM940FkrEPDIbz4IfAapmx Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10372"; a="278178192" X-IronPort-AV: E=Sophos;i="5.91,286,1647327600"; d="scan'208";a="278178192" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2022 12:19:29 -0700 X-IronPort-AV: E=Sophos;i="5.91,286,1647327600"; d="scan'208";a="580206809" Received: from pperi-mobl.amr.corp.intel.com (HELO mjmartin-desk2.intel.com) ([10.252.138.161]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2022 12:19:29 -0700 From: Mat Martineau To: netdev@vger.kernel.org Cc: Ossama Othman , davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, edumazet@google.com, matthieu.baerts@tessares.net, mptcp@lists.linux.dev, Mat Martineau Subject: [PATCH net-next 1/2] mptcp: fix conflict with Date: Wed, 8 Jun 2022 12:19:18 -0700 Message-Id: <20220608191919.327705-2-mathew.j.martineau@linux.intel.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220608191919.327705-1-mathew.j.martineau@linux.intel.com> References: <20220608191919.327705-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" From: Ossama Othman Including before the C library header causes symbol redefinition errors at compile-time due to duplicate declarations and definitions in the header included by . Explicitly include before in when __KERNEL__ is not defined so that the C library compatibility logic in is enabled when including in user space code. Fixes: c11c5906bc0a ("mptcp: add MPTCP_SUBFLOW_ADDRS getsockopt support") Signed-off-by: Ossama Othman Signed-off-by: Mat Martineau --- include/uapi/linux/mptcp.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/include/uapi/linux/mptcp.h b/include/uapi/linux/mptcp.h index 921963589904..dfe19bf13f4c 100644 --- a/include/uapi/linux/mptcp.h +++ b/include/uapi/linux/mptcp.h @@ -2,16 +2,17 @@ #ifndef _UAPI_MPTCP_H #define _UAPI_MPTCP_H =20 +#ifndef __KERNEL__ +#include /* for sockaddr_in and sockaddr_in6 */ +#include /* for struct sockaddr */ +#endif + #include #include #include /* for sockaddr_in */ #include /* for sockaddr_in6 */ #include /* for sockaddr_storage and sa_family */ =20 -#ifndef __KERNEL__ -#include /* for struct sockaddr */ -#endif - #define MPTCP_SUBFLOW_FLAG_MCAP_REM _BITUL(0) #define MPTCP_SUBFLOW_FLAG_MCAP_LOC _BITUL(1) #define MPTCP_SUBFLOW_FLAG_JOIN_REM _BITUL(2) --=20 2.36.1 From nobody Thu Sep 18 06:46:30 2025 Delivered-To: wpasupplicant.patchew@gmail.com Received: by 2002:a9f:3042:0:0:0:0:0 with SMTP id i2csp530uab; Wed, 8 Jun 2022 12:19:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+bxFbDWxppX+nFQTmYWK0XdVJQWbr5lRUX3NOqTvEqhwvhLhkP8rW/bE/TwfPUc2Lmv4A X-Received: by 2002:a05:6830:2:b0:60c:bc9:dd1 with SMTP id c2-20020a056830000200b0060c0bc90dd1mr3690831otp.185.1654715981091; Wed, 08 Jun 2022 12:19:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654715981; cv=none; d=google.com; s=arc-20160816; b=IOUG/xGPHkZ5w3PloQ8kVGF4gFZfujG0PeW9xxBNQeTHqhxwu5fnmMVPqKxchdFU8N ICczUlWHyydafMJFvaA6ulZnS8Elsf0WiU6ahHn9c36ov8A00kGFMhFS1rfTAbZJTFo7 BGJ5vH1Gbhc7IoiSVxMbnf1S+Ur2ZK5LQoIoyncNrCGw64CGLV9gawGNzSx2PHVnI5N6 X8+KVufGbVNqRFB5rMWltDtP4+YDeLhhsdB8N8xaoYyz7obn+RVdUmMIDeXQKiTbBoSi kL6sARtF6H0TXuaVIiLgG7Xlf3xaqZGgB0mXdC/k6F/8m4Z3wb9hUdO9yLYO9nKweCr0 Rbnw== 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=IWhHEmTLMyaLBzMO699PBHiDEoguDwac4DOiV6RkJTA=; b=M1T7+SxeSaVcIwefJU5DS5nq4uydINtoHhXZ6o66cjDrSOzfrxJ/dRmnVSQAS3q2n2 SmUX7Ttcz0o/+KKhMcsPSb1xkBPhz+uODAGgZXrMCeDv3mS6ZhXpgThr32qH2ythZh4x 0Oe+5IQ2+s9BxqieFpiemGa31DoQlxsUFeZKu630A23/TDPPqze2FDQLTBSsn9fBEC5u e1/OK1vfNsRwHmzHFhFTG+tAJF8iPXjq6OQLgF/v9wg3c3PFpPO/X1AfiUKN/KJAjbDV HVjssJSKEIhYonhj4NuwkKJ+gi2kIIrVBjeBNMolA1spqqWQ8839j7HW79YjtVCSApWT OPpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=KM40fXGA; spf=pass (google.com: domain of mptcp+bounces-5598-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="mptcp+bounces-5598-wpasupplicant.patchew=gmail.com@lists.linux.dev"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id s30-20020a056870611e00b000fb0d3a4a8esi16179542oae.125.2022.06.08.12.19.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Jun 2022 12:19:41 -0700 (PDT) Received-SPF: pass (google.com: domain of mptcp+bounces-5598-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=KM40fXGA; spf=pass (google.com: domain of mptcp+bounces-5598-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="mptcp+bounces-5598-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 341EA280A85 for ; Wed, 8 Jun 2022 19:19:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4E7F033D3; Wed, 8 Jun 2022 19:19:33 +0000 (UTC) X-Original-To: mptcp@lists.linux.dev Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 DA18633D8 for ; Wed, 8 Jun 2022 19:19: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=1654715971; x=1686251971; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ypaTwO0pQdtrccJnIA7clYfA5CtbDAy0cfvBFehY6Fg=; b=KM40fXGASuVtDUWM59kCGlMlTYP085EgWmS7r5Yr2p7VOoZoGp0qUJan yLb/RfO/97byHtvNFM6hFRGETYX69QiQYC1f034u4WPW2eAoL1+UvVbYm L/Nu2AhXZt7iMW6SMOz9XStb9OKO0OSF0liUuQIsvdREwnPgXMAE+I2WQ 0/PUfR8hGYURngrLzXv6PJWhOSMhW8nwSWQ48gg8DV/UdP1P41at6b1UV y/PBOE+y/zU50Il8jY7xsIZHzmX93HHcvccE1sGpNJdaQaSoroi5+dxDX cuDvHzxvr77hnwTSdhysrWA7Yns40UnwfRIp1hB9gHAQ9LBmeOL2RVcXi Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10372"; a="278178196" X-IronPort-AV: E=Sophos;i="5.91,286,1647327600"; d="scan'208";a="278178196" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2022 12:19:29 -0700 X-IronPort-AV: E=Sophos;i="5.91,286,1647327600"; d="scan'208";a="580206810" Received: from pperi-mobl.amr.corp.intel.com (HELO mjmartin-desk2.intel.com) ([10.252.138.161]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2022 12:19:29 -0700 From: Mat Martineau To: netdev@vger.kernel.org Cc: Geliang Tang , davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, edumazet@google.com, matthieu.baerts@tessares.net, mptcp@lists.linux.dev, Mat Martineau Subject: [PATCH net-next 2/2] mptcp: move MPTCPOPT_HMAC_LEN to net/mptcp.h Date: Wed, 8 Jun 2022 12:19:19 -0700 Message-Id: <20220608191919.327705-3-mathew.j.martineau@linux.intel.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220608191919.327705-1-mathew.j.martineau@linux.intel.com> References: <20220608191919.327705-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" From: Geliang Tang Move macro MPTCPOPT_HMAC_LEN definition from net/mptcp/protocol.h to include/net/mptcp.h. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau --- include/net/mptcp.h | 3 ++- net/mptcp/protocol.h | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/net/mptcp.h b/include/net/mptcp.h index 4d761ad530c9..ac9cf7271d46 100644 --- a/include/net/mptcp.h +++ b/include/net/mptcp.h @@ -39,6 +39,7 @@ struct mptcp_ext { infinite_map:1; }; =20 +#define MPTCPOPT_HMAC_LEN 20 #define MPTCP_RM_IDS_MAX 8 =20 struct mptcp_rm_list { @@ -89,7 +90,7 @@ struct mptcp_out_options { u32 nonce; u32 token; u64 thmac; - u8 hmac[20]; + u8 hmac[MPTCPOPT_HMAC_LEN]; }; }; #endif diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h index 200f89f6d62f..8f03775a2f22 100644 --- a/net/mptcp/protocol.h +++ b/net/mptcp/protocol.h @@ -83,7 +83,6 @@ =20 /* MPTCP MP_JOIN flags */ #define MPTCPOPT_BACKUP BIT(0) -#define MPTCPOPT_HMAC_LEN 20 #define MPTCPOPT_THMAC_LEN 8 =20 /* MPTCP MP_CAPABLE flags */ --=20 2.36.1