From patchwork Tue Nov 5 19:05:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Krystad X-Patchwork-Id: 1189894 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=198.145.21.10; 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 [198.145.21.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 476zf571zHz9s7T for ; Wed, 6 Nov 2019 06:06:05 +1100 (AEDT) Received: from new-ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id DABB0100DC42F; Tue, 5 Nov 2019 11:08:42 -0800 (PST) Received-SPF: None (mailfrom) identity=mailfrom; client-ip=134.134.136.100; helo=mga07.intel.com; envelope-from=peter.krystad@linux.intel.com; receiver= Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 D85B7100DC42C for ; Tue, 5 Nov 2019 11:08:40 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Nov 2019 11:05:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,271,1569308400"; d="scan'208";a="227215639" Received: from pkrystad-mobl4.sea.intel.com (HELO localhost.localdomain) ([10.252.132.183]) by fmsmga004.fm.intel.com with ESMTP; 05 Nov 2019 11:05:59 -0800 From: Peter Krystad To: mptcp@lists.01.org Date: Tue, 5 Nov 2019 11:05:53 -0800 Message-Id: <20191105190557.6405-1-peter.krystad@linux.intel.com> X-Mailer: git-send-email 2.17.2 Message-ID-Hash: R3RBNJHAJHV3K54SV5DP3JR6M7THU6Y6 X-Message-ID-Hash: R3RBNJHAJHV3K54SV5DP3JR6M7THU6Y6 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 1/5] mptcp: Make MPTCP IPv6 support depend on CONFIG_IPV6=y List-Id: Discussions regarding MPTCP upstreaming Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Do not allow MPTCP IPv6 support if IPv6 is included as a module. squashto: Add MPTCP socket stubs Signed-off-by: Peter Krystad --- net/mptcp/Kconfig | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/net/mptcp/Kconfig b/net/mptcp/Kconfig index f21190a4f7e9..c1a99f07a4cd 100644 --- a/net/mptcp/Kconfig +++ b/net/mptcp/Kconfig @@ -1,6 +1,6 @@ config MPTCP - bool "Multipath TCP" + bool "MPTCP: Multipath TCP" depends on INET select SKB_EXTENSIONS help @@ -9,3 +9,8 @@ config MPTCP uses the TCP protocol, and TCP options carry header information for MPTCP. +config MPTCP_IPV6 + bool "MPTCP: IPv6 support for Multipath TCP" + depends on MPTCP + select IPV6 + default y From patchwork Tue Nov 5 19:05:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Krystad X-Patchwork-Id: 1189893 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) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 476zf606BRz9sNx for ; Wed, 6 Nov 2019 06:06:05 +1100 (AEDT) Received: from new-ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id E4337100DC433; Tue, 5 Nov 2019 11:08:42 -0800 (PST) Received-SPF: None (mailfrom) identity=mailfrom; client-ip=134.134.136.100; helo=mga07.intel.com; envelope-from=peter.krystad@linux.intel.com; receiver= Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 F00FA100DC42C for ; Tue, 5 Nov 2019 11:08:40 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Nov 2019 11:05:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,271,1569308400"; d="scan'208";a="227215641" Received: from pkrystad-mobl4.sea.intel.com (HELO localhost.localdomain) ([10.252.132.183]) by fmsmga004.fm.intel.com with ESMTP; 05 Nov 2019 11:05:59 -0800 From: Peter Krystad To: mptcp@lists.01.org Date: Tue, 5 Nov 2019 11:05:54 -0800 Message-Id: <20191105190557.6405-2-peter.krystad@linux.intel.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20191105190557.6405-1-peter.krystad@linux.intel.com> References: <20191105190557.6405-1-peter.krystad@linux.intel.com> Message-ID-Hash: TD7B3TEPL652FOJDFCYIKQOR267U5AM3 X-Message-ID-Hash: TD7B3TEPL652FOJDFCYIKQOR267U5AM3 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 2/5] mptcp: Switch to CONFIG_MPTCP_IPV6 List-Id: Discussions regarding MPTCP upstreaming Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 squashto: Add handling of outgoing MP_JOIN requests Signed-off-by: Peter Krystad --- net/mptcp/subflow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c index 7bae7c35ea6b..704dfc49f0d5 100644 --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@ -646,7 +646,7 @@ int mptcp_subflow_connect(struct sock *sk, struct sockaddr *local, release_sock(sk); addrlen = sizeof(struct sockaddr_in); -#if IS_ENABLED(CONFIG_IPV6) +#if IS_ENABLED(CONFIG_MPTCP_IPV6) if (local->sa_family == AF_INET6) addrlen = sizeof(struct sockaddr_in6); #endif From patchwork Tue Nov 5 19:05:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Krystad X-Patchwork-Id: 1189895 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=198.145.21.10; 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 [198.145.21.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 476zf60SDFz9sP6 for ; Wed, 6 Nov 2019 06:06:05 +1100 (AEDT) Received: from new-ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id EAC09100DC437; Tue, 5 Nov 2019 11:08:42 -0800 (PST) Received-SPF: None (mailfrom) identity=mailfrom; client-ip=134.134.136.100; helo=mga07.intel.com; envelope-from=peter.krystad@linux.intel.com; receiver= Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 0AF11100DC42C for ; Tue, 5 Nov 2019 11:08:41 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Nov 2019 11:05:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,271,1569308400"; d="scan'208";a="227215642" Received: from pkrystad-mobl4.sea.intel.com (HELO localhost.localdomain) ([10.252.132.183]) by fmsmga004.fm.intel.com with ESMTP; 05 Nov 2019 11:05:59 -0800 From: Peter Krystad To: mptcp@lists.01.org Date: Tue, 5 Nov 2019 11:05:55 -0800 Message-Id: <20191105190557.6405-3-peter.krystad@linux.intel.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20191105190557.6405-1-peter.krystad@linux.intel.com> References: <20191105190557.6405-1-peter.krystad@linux.intel.com> Message-ID-Hash: Z6JRJSTES6UDQTCV3AN6MJOKPR5GYV4G X-Message-ID-Hash: Z6JRJSTES6UDQTCV3AN6MJOKPR5GYV4G 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 3/5] mptcp: Switch to CONFIG_MPTCP_IPV6 List-Id: Discussions regarding MPTCP upstreaming Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 squashto: Add Path Manager Interface Signed-off-by: Peter Krystad --- net/mptcp/options.c | 2 +- net/mptcp/pm.c | 8 ++++---- net/mptcp/protocol.h | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/net/mptcp/options.c b/net/mptcp/options.c index 1b08e1193991..5b6df7aead1d 100644 --- a/net/mptcp/options.c +++ b/net/mptcp/options.c @@ -599,7 +599,7 @@ void mptcp_incoming_options(struct sock *sk, struct sk_buff *skb, if (msk && mp_opt->add_addr) { if (mp_opt->family == MPTCP_ADDR_IPVERSION_4) mptcp_pm_add_addr(msk, &mp_opt->addr, mp_opt->addr_id); -#if IS_ENABLED(CONFIG_IPV6) +#if IS_ENABLED(CONFIG_MPTCP_IPV6) else if (mp_opt->family == MPTCP_ADDR_IPVERSION_6) mptcp_pm_add_addr6(msk, &mp_opt->addr6, mp_opt->addr_id); diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c index d45406bc3f6c..7e493d81afef 100644 --- a/net/mptcp/pm.c +++ b/net/mptcp/pm.c @@ -35,7 +35,7 @@ int mptcp_pm_announce_addr(u32 token, u8 local_id, struct in_addr *addr) return err; } -#if IS_ENABLED(CONFIG_IPV6) +#if IS_ENABLED(CONFIG_MPTCP_IPV6) int mptcp_pm_announce_addr6(u32 token, u8 local_id, struct in6_addr *addr) { struct mptcp_sock *msk = mptcp_token_get_sock(token); @@ -113,7 +113,7 @@ int mptcp_pm_create_subflow(u32 token, u8 remote_id, struct in_addr *addr) return err; } -#if IS_ENABLED(CONFIG_IPV6) +#if IS_ENABLED(CONFIG_MPTCP_IPV6) int mptcp_pm_create_subflow6(u32 token, u8 remote_id, struct in6_addr *addr) { struct mptcp_sock *msk = mptcp_token_get_sock(token); @@ -224,7 +224,7 @@ void mptcp_pm_add_addr6(struct mptcp_sock *msk, const struct in6_addr *addr, int mptcp_pm_addr_signal(struct mptcp_sock *msk, u8 *id, struct sockaddr_storage *saddr) { -#if IS_ENABLED(CONFIG_IPV6) +#if IS_ENABLED(CONFIG_MPTCP_IPV6) struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)saddr; #endif struct sockaddr_in *addr = (struct sockaddr_in *)saddr; @@ -235,7 +235,7 @@ int mptcp_pm_addr_signal(struct mptcp_sock *msk, u8 *id, if (msk->pm.local_family == AF_INET) { addr->sin_family = msk->pm.local_family; addr->sin_addr = msk->pm.local_addr; -#if IS_ENABLED(CONFIG_IPV6) +#if IS_ENABLED(CONFIG_MPTCP_IPV6) } else if (msk->pm.local_family == AF_INET6) { addr6->sin6_family = msk->pm.local_family; addr6->sin6_addr = msk->pm.local_addr6; diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h index 8fe5f9383d38..717579006051 100644 --- a/net/mptcp/protocol.h +++ b/net/mptcp/protocol.h @@ -89,7 +89,7 @@ struct mptcp_pm_data { sa_family_t local_family; union { struct in_addr local_addr; -#if IS_ENABLED(CONFIG_IPV6) +#if IS_ENABLED(CONFIG_MPTCP_IPV6) struct in6_addr local_addr6; #endif }; @@ -98,7 +98,7 @@ struct mptcp_pm_data { sa_family_t remote_family; union { struct in_addr remote_addr; -#if IS_ENABLED(CONFIG_IPV6) +#if IS_ENABLED(CONFIG_MPTCP_IPV6) struct in6_addr remote_addr6; #endif }; @@ -323,7 +323,7 @@ void mptcp_pm_add_addr6(struct mptcp_sock *msk, const struct in6_addr *addr, int mptcp_pm_announce_addr(u32 token, u8 local_id, struct in_addr *addr); int mptcp_pm_create_subflow(u32 token, u8 remote_id, struct in_addr *addr); -#if IS_ENABLED(CONFIG_IPV6) +#if IS_ENABLED(CONFIG_MPTCP_IPV6) int mptcp_pm_announce_addr6(u32 token, u8 local_id, struct in6_addr *addr); int mptcp_pm_create_subflow6(u32 token, u8 remote_id, struct in6_addr *addr); #endif From patchwork Tue Nov 5 19:05:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Krystad X-Patchwork-Id: 1189897 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) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 476zf606GWz9sP4 for ; Wed, 6 Nov 2019 06:06:05 +1100 (AEDT) Received: from new-ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id F1192100DC43B; Tue, 5 Nov 2019 11:08:42 -0800 (PST) Received-SPF: None (mailfrom) identity=mailfrom; client-ip=134.134.136.100; helo=mga07.intel.com; envelope-from=peter.krystad@linux.intel.com; receiver= Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 17CFC100DC42C for ; Tue, 5 Nov 2019 11:08:41 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Nov 2019 11:05:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,271,1569308400"; d="scan'208";a="227215643" Received: from pkrystad-mobl4.sea.intel.com (HELO localhost.localdomain) ([10.252.132.183]) by fmsmga004.fm.intel.com with ESMTP; 05 Nov 2019 11:05:59 -0800 From: Peter Krystad To: mptcp@lists.01.org Date: Tue, 5 Nov 2019 11:05:56 -0800 Message-Id: <20191105190557.6405-4-peter.krystad@linux.intel.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20191105190557.6405-1-peter.krystad@linux.intel.com> References: <20191105190557.6405-1-peter.krystad@linux.intel.com> Message-ID-Hash: EQWQT7TKN46INA3CUB4I7UBNW4XYI3W3 X-Message-ID-Hash: EQWQT7TKN46INA3CUB4I7UBNW4XYI3W3 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 4/5] mptcp: Switch to CONFIG_MPTCP_IPV6 List-Id: Discussions regarding MPTCP upstreaming Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 squashto: Add ADD_ADDR handling Signed-off-by: Peter Krystad --- include/net/mptcp.h | 2 +- net/mptcp/options.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/net/mptcp.h b/include/net/mptcp.h index eba39a881767..1196a5588ce1 100644 --- a/include/net/mptcp.h +++ b/include/net/mptcp.h @@ -35,7 +35,7 @@ struct mptcp_out_options { u64 rcvr_key; union { struct in_addr addr; -#if IS_ENABLED(CONFIG_IPV6) +#if IS_ENABLED(CONFIG_MPTCP_IPV6) struct in6_addr addr6; #endif }; diff --git a/net/mptcp/options.c b/net/mptcp/options.c index 5b6df7aead1d..e050a3966280 100644 --- a/net/mptcp/options.c +++ b/net/mptcp/options.c @@ -223,7 +223,7 @@ void mptcp_parse_option(const unsigned char *ptr, int opsize, if (mp_opt->family == MPTCP_ADDR_IPVERSION_4 && opsize != TCPOLEN_MPTCP_ADD_ADDR) break; -#if IS_ENABLED(CONFIG_IPV6) +#if IS_ENABLED(CONFIG_MPTCP_IPV6) if (mp_opt->family == MPTCP_ADDR_IPVERSION_6 && opsize != TCPOLEN_MPTCP_ADD_ADDR6) break; @@ -235,7 +235,7 @@ void mptcp_parse_option(const unsigned char *ptr, int opsize, pr_debug("ADD_ADDR: addr=%x, id=%d", mp_opt->addr.s_addr, mp_opt->addr_id); } -#if IS_ENABLED(CONFIG_IPV6) +#if IS_ENABLED(CONFIG_MPTCP_IPV6) else { mp_opt->add_addr = 1; memcpy(mp_opt->addr6.s6_addr, (u8 *)ptr, 16); @@ -472,7 +472,7 @@ static bool mptcp_established_options_addr(struct sock *sk, opts->addr = ((struct sockaddr_in *)&saddr)->sin_addr; *size = TCPOLEN_MPTCP_ADD_ADDR; } -#if IS_ENABLED(CONFIG_IPV6) +#if IS_ENABLED(CONFIG_MPTCP_IPV6) else if (saddr.ss_family == AF_INET6) { if (remaining < TCPOLEN_MPTCP_ADD_ADDR6) return false; @@ -668,7 +668,7 @@ void mptcp_write_options(__be32 *ptr, struct mptcp_out_options *opts) ptr += 1; } -#if IS_ENABLED(CONFIG_IPV6) +#if IS_ENABLED(CONFIG_MPTCP_IPV6) if (OPTION_MPTCP_ADD_ADDR6 & opts->suboptions) { *ptr++ = mptcp_option(MPTCPOPT_ADD_ADDR, TCPOLEN_MPTCP_ADD_ADDR6, From patchwork Tue Nov 5 19:05:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Krystad X-Patchwork-Id: 1189896 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=198.145.21.10; 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 [198.145.21.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 476zf614VKz9sP7 for ; Wed, 6 Nov 2019 06:06:05 +1100 (AEDT) Received: from new-ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 03CE3100DC43F; Tue, 5 Nov 2019 11:08:43 -0800 (PST) Received-SPF: None (mailfrom) identity=mailfrom; client-ip=134.134.136.100; helo=mga07.intel.com; envelope-from=peter.krystad@linux.intel.com; receiver= Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 2E941100DC42C for ; Tue, 5 Nov 2019 11:08:41 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Nov 2019 11:06:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,271,1569308400"; d="scan'208";a="227215644" Received: from pkrystad-mobl4.sea.intel.com (HELO localhost.localdomain) ([10.252.132.183]) by fmsmga004.fm.intel.com with ESMTP; 05 Nov 2019 11:06:00 -0800 From: Peter Krystad To: mptcp@lists.01.org Date: Tue, 5 Nov 2019 11:05:57 -0800 Message-Id: <20191105190557.6405-5-peter.krystad@linux.intel.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20191105190557.6405-1-peter.krystad@linux.intel.com> References: <20191105190557.6405-1-peter.krystad@linux.intel.com> Message-ID-Hash: MPP4SRKQMUX4M7KH2XTVAH4QA6HNALO6 X-Message-ID-Hash: MPP4SRKQMUX4M7KH2XTVAH4QA6HNALO6 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 5/5] mptcp: Switch to CONFIG_MPTCP_IPV6 List-Id: Discussions regarding MPTCP upstreaming Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 squashto: Implement Basic Path Manager Signed-off-by: Peter Krystad --- net/mptcp/basic.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/net/mptcp/basic.c b/net/mptcp/basic.c index 67a93aff500e..86e0d8862c19 100644 --- a/net/mptcp/basic.c +++ b/net/mptcp/basic.c @@ -17,7 +17,7 @@ struct basic_pernet { union { struct in_addr announce_v4_addr; -#if IS_ENABLED(CONFIG_IPV6) +#if IS_ENABLED(CONFIG_MPTCP_IPV6) struct in6_addr announce_v6_addr; #endif }; @@ -37,7 +37,7 @@ static int parse_addr(struct basic_pernet *pernet, const char *addr) pernet->has_announce_v6 = 0; return 0; } -#if IS_ENABLED(CONFIG_IPV6) +#if IS_ENABLED(CONFIG_MPTCP_IPV6) if (in6_pton(addr, -1, (u8 *)&pernet->announce_v6_addr.s6_addr, '\0', NULL) > 0) { pernet->has_announce_v4 = 0; @@ -73,7 +73,7 @@ static int proc_parse_addr(struct ctl_table *ctl, int write, &pernet->announce_v4_addr); tbl.data = tmp; } -#if IS_ENABLED(CONFIG_IPV6) +#if IS_ENABLED(CONFIG_MPTCP_IPV6) else if (pernet->has_announce_v6) { snprintf(tmp, INET6_ADDRSTRLEN, "%pI6c", &pernet->announce_v6_addr); @@ -196,7 +196,7 @@ static void announce_addr_worker(struct work_struct *work) if (pernet->has_announce_v4 && msk->family == AF_INET) mptcp_pm_announce_addr(pm->token, 1, &pernet->announce_v4_addr); -#if IS_ENABLED(CONFIG_IPV6) +#if IS_ENABLED(CONFIG_MPTCP_IPV6) else if (pernet->has_announce_v6 && msk->family == AF_INET6) mptcp_pm_announce_addr6(pm->token, 1, &pernet->announce_v6_addr); @@ -221,7 +221,7 @@ static void create_subflow_worker(struct work_struct *work) mptcp_pm_create_subflow(pm->token, pm->remote_id, NULL); } -#if IS_ENABLED(CONFIG_IPV6) +#if IS_ENABLED(CONFIG_MPTCP_IPV6) else if (pm->remote_family == AF_INET6) { if (pernet->has_announce_v6) mptcp_pm_create_subflow6(pm->token, pm->remote_id,