From nobody Thu Sep 18 11:14:15 2025 Delivered-To: wpasupplicant.patchew@gmail.com Received: by 2002:a02:3b21:0:0:0:0:0 with SMTP id c33csp2129982jaa; Wed, 2 Feb 2022 23:25:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJx2gTDxKluaE9IIy83SYtKzm+FMrzr0Mo8nZXSXtlX/kf+ONOV2pBDNE+3Eq1s6XC3ZW4OK X-Received: by 2002:a63:2bd1:: with SMTP id r200mr20051323pgr.68.1643873126669; Wed, 02 Feb 2022 23:25:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643873126; cv=none; d=google.com; s=arc-20160816; b=jW3yfcsonSHp8NR5qpgNyPlU5IFRsl93aLA3FUlAF0+OK5vKpyEAApw/xJ/4hbdDAr 9sXgPD+uSrrT+c0MMv/fzUC2e15mdqFL9RtEIx/UscYTaKMTo/vl1n/MOLI0lwyzLIoW KArhyXeEZ0KkZELWt/q+2DF7UirMq56FqTCDpkvS/sxURLYrX4gLgDZ25X3K6JzG7MR0 uzbShiKxxnVRhdnj8kQUVgw48f2FU5l6iyS8EeiVKMIutJoXxhxlIiYsxE/can/Kx9sS p2TAzOQuE/1sR4Ff8Bw9ELr7oZ+N7HvIO1QY2IjbTT0K7XYxhnajRVuRpS9f2texFAMh ZkYg== 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:to:from:dkim-signature; bh=2v4sr7tYI8j1Bp/uboNIoET31kzRh8vd8os++8O8A7Y=; b=iZssIDjKTJdZrVWC5zD39kImhuOvdrCicRGDlHmQ8JUf1Q3nOW26VxeuPIi2thtdEu eGOQtTbzUHvTQKl5vlvbm5PDPi5HSrsuW0zSAUa6uLHf95AHntkwMRzwPMgnN5PcMY58 nwRE5+4roCU+X5WOH+eneoHIFrVrkZ/RbFdO+/iiOr98HXAJpyozXDwYLZcmEK1X5Z3A lf2GuvT6GpKg/63lxS1DtIpJitaNTR6IP7oWhbr608SMk/2DR1Jf/8eo3DvkGy1sykKi j775KnvEXPOV9Z/oQVoogZCgITX3qO3Z6IdiQALFwuUa8rgkPfs0zEj5mrak7LVXb+0P RcHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=XoXVE9Qx; spf=pass (google.com: domain of mptcp+bounces-3449-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 147.75.69.165 as permitted sender) smtp.mailfrom="mptcp+bounces-3449-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 u22si6883210pjx.70.2022.02.02.23.25.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Feb 2022 23:25:26 -0800 (PST) Received-SPF: pass (google.com: domain of mptcp+bounces-3449-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=XoXVE9Qx; spf=pass (google.com: domain of mptcp+bounces-3449-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 147.75.69.165 as permitted sender) smtp.mailfrom="mptcp+bounces-3449-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 55E543E103C for ; Thu, 3 Feb 2022 07:25:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 609452CA1; Thu, 3 Feb 2022 07:25:21 +0000 (UTC) X-Original-To: mptcp@lists.linux.dev Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 7CE5E2CA5 for ; Thu, 3 Feb 2022 07:25:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643873120; x=1675409120; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=GWC00DGcOIXpenWBtT7VMMPLeYZ8SNQrpkt8jAQUe5k=; b=XoXVE9Qxnhj0cT+y+BLfYOaTwFVbg3wyXJWUG1ZVdFOXU0+9fpN4r4Jx xrY1IHrPH+6dLPNy96NLpGdMjNpmsUkD2wa/QtQ0v7zgGMJts6d7dI3Bg qKLhsJ8KcQiFM57BY6jw9VEaVsCC9YKghexqIMzwrAZEwo3aJ2GtNn3oN E9D6plVjFQ+vAJjOUxuTiL1YlxcXNpo0qvvko/Hwh+arwiaQ8Pfz2y0Ch JNaSNTm5F+V3Xst3TWYW3MotbYrPHTLoY1D0Wy17DTjkMdufM23zhu04s 4d6YyPAIb9/IRu3SC7jtj2ufr/b3X8LhVsDlcxPSrDUyZFv4Dlh5/5M79 A==; X-IronPort-AV: E=McAfee;i="6200,9189,10246"; a="272580777" X-IronPort-AV: E=Sophos;i="5.88,339,1635231600"; d="scan'208";a="272580777" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2022 23:25:14 -0800 X-IronPort-AV: E=Sophos;i="5.88,339,1635231600"; d="scan'208";a="535118736" Received: from otc-tsn-4.jf.intel.com ([10.23.153.135]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2022 23:25:14 -0800 From: Kishen Maloor To: kishen.maloor@intel.com, mptcp@lists.linux.dev Subject: [PATCH mptcp-next v5 8/8] mptcp: expose server_side attribute in MPTCP netlink events Date: Thu, 3 Feb 2022 02:25:08 -0500 Message-Id: <20220203072508.3072309-9-kishen.maloor@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220203072508.3072309-1-kishen.maloor@intel.com> References: <20220203072508.3072309-1-kishen.maloor@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" This change records the server_side attribute in MPTCP_EVENT_CREATED and MPTCP_EVENT_ESTABLISHED events to inform the recipient of the role of the associated MPTCP application (Client/Server) that is handling it's end of the MPTCP connection. Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/246 Signed-off-by: Kishen Maloor --- include/uapi/linux/mptcp.h | 1 + net/mptcp/pm_netlink.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/include/uapi/linux/mptcp.h b/include/uapi/linux/mptcp.h index 265cabc0d7aa..0df44a116a31 100644 --- a/include/uapi/linux/mptcp.h +++ b/include/uapi/linux/mptcp.h @@ -188,6 +188,7 @@ enum mptcp_event_attr { MPTCP_ATTR_IF_IDX, /* s32 */ MPTCP_ATTR_RESET_REASON,/* u32 */ MPTCP_ATTR_RESET_FLAGS, /* u32 */ + MPTCP_ATTR_SERVER_SIDE, /* u8 */ =20 __MPTCP_ATTR_AFTER_LAST }; diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c index 9b3d871d3712..eaa1a5a21192 100644 --- a/net/mptcp/pm_netlink.c +++ b/net/mptcp/pm_netlink.c @@ -2097,6 +2097,9 @@ static int mptcp_event_created(struct sk_buff *skb, if (err) return err; =20 + if (nla_put_u8(skb, MPTCP_ATTR_SERVER_SIDE, READ_ONCE(msk->pm.server_side= ))) + return -EMSGSIZE; + return mptcp_event_add_subflow(skb, ssk); } =20 --=20 2.31.1