From patchwork Wed Nov 13 06:45:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Krystad X-Patchwork-Id: 1194086 X-Patchwork-Delegate: matthieu.baerts@tessares.net 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=none (p=none dis=none) header.from=linux.intel.com 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 47CZqs5VbYz9sNH for ; Wed, 13 Nov 2019 17:45:29 +1100 (AEDT) Received: from new-ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id BA98E100DC3C0; Tue, 12 Nov 2019 22:47:04 -0800 (PST) Received-SPF: None (mailfrom) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=peter.krystad@linux.intel.com; receiver= Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5DF2D100DC420 for ; Tue, 12 Nov 2019 22:47:02 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Nov 2019 22:45:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,299,1569308400"; d="scan'208";a="214252761" Received: from unknown (HELO localhost.localdomain) ([10.251.23.81]) by fmsmga001.fm.intel.com with ESMTP; 12 Nov 2019 22:45:21 -0800 From: Peter Krystad To: mptcp@lists.01.org Date: Tue, 12 Nov 2019 22:45:18 -0800 Message-Id: <20191113064518.4823-9-peter.krystad@linux.intel.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20191113064518.4823-1-peter.krystad@linux.intel.com> References: <20191113064518.4823-1-peter.krystad@linux.intel.com> Message-ID-Hash: EHJPR7IUKDLCUA6O5AIMWFPMFXUKS3A3 X-Message-ID-Hash: EHJPR7IUKDLCUA6O5AIMWFPMFXUKS3A3 X-MailFrom: peter.krystad@linux.intel.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 8/8] mptcp: Add IPv6 support for new sysctl initialization List-Id: Discussions regarding MPTCP upstreaming Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 squashto: new sysctl to control the activation per NS Signed-off-by: Peter Krystad --- net/mptcp/ctrl.c | 11 +++++++++++ net/mptcp/protocol.c | 2 +- net/mptcp/protocol.h | 3 +++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/net/mptcp/ctrl.c b/net/mptcp/ctrl.c index 6023c9f722ea..8e39585d37f3 100644 --- a/net/mptcp/ctrl.c +++ b/net/mptcp/ctrl.c @@ -117,3 +117,14 @@ void __init mptcp_init(void) if (register_pernet_subsys(&mptcp_pernet_ops) < 0) panic("Failed to register MPTCP pernet subsystem.\n"); } + +#if IS_ENABLED(CONFIG_MPTCP_IPV6) +int __init mptcpv6_init(void) +{ + int err; + + err = mptcp_proto_v6_init(); + + return err; +} +#endif diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index a831e7fdb90f..564a6204649e 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -999,7 +999,7 @@ static struct inet_protosw mptcp_v6_protosw = { .flags = INET_PROTOSW_ICSK, }; -int mptcpv6_init(void) +int mptcp_proto_v6_init(void) { int err; diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h index 2566858ea272..80e4cbfc389a 100644 --- a/net/mptcp/protocol.h +++ b/net/mptcp/protocol.h @@ -232,6 +232,9 @@ extern const struct inet_connection_sock_af_ops ipv6_specific; #endif void mptcp_proto_init(void); +#if IS_ENABLED(CONFIG_MPTCP_IPV6) +int mptcp_proto_v6_init(void); +#endif struct mptcp_read_arg { struct msghdr *msg;