mptcp: Make MPTCP IPv6 support depend on CONFIG_IPV6=y
Subsystems (2)
Peter Krystad
PATCH 1/5 mptcp: Make MPTCP IPv6 support depend on CONFIG_IPV6=y
Do not allow MPTCP IPv6 support if IPv6 is included as a module.
squashto: Add MPTCP socket stubs
--- net/mptcp/Kconfig | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
net/mptcp/Kconfig +6 -1
@@ -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
Signature · 1 line
2.17.2
Peter Krystad
PATCH 2/5 mptcp: Switch to CONFIG_MPTCP_IPV6
squashto: Add handling of outgoing MP_JOIN requests
--- net/mptcp/subflow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/mptcp/subflow.c +1 -1
@@ -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
Signature · 1 line
2.17.2
Peter Krystad
PATCH 3/5 mptcp: Switch to CONFIG_MPTCP_IPV6
In reply to Peter Krystadsquashto: Add Path Manager Interface
--- net/mptcp/options.c | 2 +- net/mptcp/pm.c | 8 ++++---- net/mptcp/protocol.h | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-)
net/mptcp/options.c +1 -1
@@ -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);
net/mptcp/pm.c +4 -4
@@ -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;
net/mptcp/protocol.h +3 -3
@@ -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
Signature · 1 line
2.17.2
Peter Krystad
PATCH 4/5 mptcp: Switch to CONFIG_MPTCP_IPV6
In reply to Peter Krystadsquashto: Add ADD_ADDR handling
--- include/net/mptcp.h | 2 +- net/mptcp/options.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-)
include/net/mptcp.h +1 -1
@@ -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 };
net/mptcp/options.c +4 -4
@@ -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,
Signature · 1 line
2.17.2
Peter Krystad
PATCH 5/5 mptcp: Switch to CONFIG_MPTCP_IPV6
In reply to Peter Krystadsquashto: Implement Basic Path Manager
--- net/mptcp/basic.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
net/mptcp/basic.c +5 -5
@@ -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,
Signature · 1 line
2.17.2
Paolo Abeni
Quoted 5 lines · Peter Krystad
Do not allow MPTCP IPv6 support if IPv6 is included as a module.
squashto: Add MPTCP socket stubs
Signed-off-by Peter Krystad <peter.krystad(a)linux.intel.com>
Series LGTM, thanks for the detailed squashing guidance!
/P
Matthieu Baerts
Hi Peter, Paolo,
Quoted 8 lines · Paolo Abeni
Quoted 5 lines · Peter Krystad
Do not allow MPTCP IPv6 support if IPv6 is included as a module.
squashto: Add MPTCP socket stubs
Signed-off-by Peter Krystad <peter.krystad(a)linux.intel.com>Series LGTM, thanks for the detailed squashing guidance!
Thank you for the series and the reviews!
- 33ed5b5b51bf: "squashed" patch 1/5 in "mptcp: Add MPTCP socket stubs"
- 9e9c548823d0: "squashed" patch 2/5 in "mptcp: Add handling of outgoing MP_JOIN requests"
- 34ccdbb3a9aa: "squashed" patch 3/5 in "mptcp: Add path manager interface"
- 85084e907807: "squashed" patch 4/5 in "mptcp: Add ADD_ADDR handling"
- e4a3b46641e1: "squashed" patch 5/5 in "mptcp: Implement basic path manager"
- e225da73a467..f3e04ebb0c5a: result
Cheers,
Matt
Signature · 5 lines
Matthieu Baerts | R&D Engineer matthieu.baerts(a)tessares.net Tessares SA | Hybrid Access Solutions www.tessares.net 1 Avenue Jean Monnet, 1348 Louvain-la-Neuve, Belgium