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