Skip to contentSkip to conversation

Add IPv6 Support

PATCH In review Peter Krystad 3 participants 13 messages Nov 13, 2019 – Nov 14, 2019

Subsystems (3)
lore
Share & tools
lore

Peter Krystad

author
#0 lore raw

cover Add IPv6 Support

This patchset is a replacement for the single "Add IPv6 Support" commit, with the chunks broken into seperate squash-able commits.

Peter Krystad (8):
mptcp: Add IPv6 support for MPTCP socket stubs
mptcp: Add IPv6 support for Associate MPTCP context
mptcp: Add IPV6 support for outgoing connections
mptcp: Add IPv6 support for mptcp_poll
mptcp: Add IPV6 support for incoming connections
mptcp: Add IPv6 support for key generation
mptcp: Add IPv6 support for shutdown()
mptcp: Add IPv6 support for new sysctl initialization

 include/net/mptcp.h  | 10 +++++++
 net/ipv6/tcp_ipv6.c  |  7 +++++
 net/mptcp/ctrl.c     | 11 ++++++++
 net/mptcp/protocol.c | 62 +++++++++++++++++++++++++++++++++++++++++---
 net/mptcp/protocol.h |  6 +++++
 net/mptcp/subflow.c  | 61 +++++++++++++++++++++++++++++++++++++++++--
 6 files changed, 151 insertions(+), 6 deletions(-)
Signature · 1 line
2.17.2
author
#1 lore raw

PATCH 1/8 mptcp: Add IPv6 support for MPTCP socket stubs

squashto: Add MPTCP socket stubs

Signed-off-by Peter Krystad <peter.krystad(a)linux.intel.com>
---
 include/net/mptcp.h  | 10 ++++++++++
 net/ipv6/tcp_ipv6.c  |  7 +++++++
 net/mptcp/protocol.c | 19 +++++++++++++++++++
 3 files changed, 36 insertions(+)
include/net/mptcp.h +10 -0
index 535b27f6ba03..cc173e5f7900 100644
@@ -146,4 +146,14 @@ static inline bool mptcp_sk_is_subflow(const struct sock *sk)
 }
 
 #endif /* CONFIG_MPTCP */
+
+#if IS_ENABLED(CONFIG_MPTCP_IPV6)
+int mptcpv6_init(void);
+#elif IS_ENABLED(CONFIG_IPV6)
+static inline int mptcpv6_init(void)
+{
+	return 0;
+}
+#endif
+
 #endif /* __NET_MPTCP_H */
net/ipv6/tcp_ipv6.c +7 -0
index bae175b57e0f..bcc3bb89938d 100644
@@ -2108,9 +2108,16 @@ int __init tcpv6_init(void)
 	ret = register_pernet_subsys(&tcpv6_net_ops);
 	if (ret)
 		goto out_tcpv6_protosw;
+
+	ret = mptcpv6_init();
+	if (ret)
+		goto out_tcpv6_pernet_subsys;
+
 out:
 	return ret;
 
+out_tcpv6_pernet_subsys:
+	unregister_pernet_subsys(&tcpv6_net_ops);
 out_tcpv6_protosw:
 	inet6_unregister_protosw(&tcpv6_protosw);
 out_tcpv6_protocol:
net/mptcp/protocol.c +19 -0
index 42b33ed6b870..aa8444c2dd71 100644
@@ -963,3 +963,22 @@ void mptcp_proto_init(void)
 
 	inet_register_protosw(&mptcp_protosw);
 }
+
+#if IS_ENABLED(CONFIG_MPTCP_IPV6)
+static struct inet_protosw mptcp_v6_protosw = {
+	.type		= SOCK_STREAM,
+	.protocol	= IPPROTO_MPTCP,
+	.prot		= &mptcp_prot,
+	.ops		= &inet6_stream_ops,
+	.flags		= INET_PROTOSW_ICSK,
+};
+
+int mptcpv6_init(void)
+{
+	int err;
+
+	err = inet6_register_protosw(&mptcp_v6_protosw);
+
+	return err;
+}
+#endif
Signature · 1 line
2.17.2
author
#2 lore raw

PATCH 2/8 mptcp: Add IPv6 support for Associate MPTCP context

In reply to Peter Krystad

squashto: Associate MPTCP context with TCP socket

Signed-off-by Peter Krystad <peter.krystad(a)linux.intel.com>
---
 net/mptcp/protocol.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
net/mptcp/protocol.c +7 -1
index aa8444c2dd71..03f43f3a7a9a 100644
@@ -965,11 +965,13 @@ void mptcp_proto_init(void)
 }
 
 #if IS_ENABLED(CONFIG_MPTCP_IPV6)
+static struct proto_ops mptcp_v6_stream_ops;
+
 static struct inet_protosw mptcp_v6_protosw = {
 	.type		= SOCK_STREAM,
 	.protocol	= IPPROTO_MPTCP,
 	.prot		= &mptcp_prot,
-	.ops		= &inet6_stream_ops,
+	.ops		= &mptcp_v6_stream_ops,
 	.flags		= INET_PROTOSW_ICSK,
 };
 
@@ -977,6 +979,10 @@ int mptcpv6_init(void)
 {
 	int err;
 
+	mptcp_v6_stream_ops = inet6_stream_ops;
+	mptcp_v6_stream_ops.bind = mptcp_bind;
+	mptcp_v6_stream_ops.connect = mptcp_stream_connect;
+
 	err = inet6_register_protosw(&mptcp_v6_protosw);
 
 	return err;
Signature · 1 line
2.17.2
author
#3 lore raw

PATCH 3/8 mptcp: Add IPV6 support for outgoing connections

In reply to Peter Krystad

squashto: Handle MP_CAPABLE options for outgoing connections

Signed-off-by Peter Krystad <peter.krystad(a)linux.intel.com>
---
 net/mptcp/protocol.h |  3 +++
 net/mptcp/subflow.c  | 18 ++++++++++++++++--
 2 files changed, 19 insertions(+), 2 deletions(-)
net/mptcp/protocol.h +3 -0
index 0c5586f14e6a..2566858ea272 100644
@@ -227,6 +227,9 @@ void mptcp_subflow_init(void);
 int mptcp_subflow_create_socket(struct sock *sk, struct socket **new_sock);
 
 extern const struct inet_connection_sock_af_ops ipv4_specific;
+#if IS_ENABLED(CONFIG_MPTCP_IPV6)
+extern const struct inet_connection_sock_af_ops ipv6_specific;
+#endif
 
 void mptcp_proto_init(void);
 
net/mptcp/subflow.c +16 -2
index 12daebe16f5d..cf53729929bd 100644
@@ -175,6 +175,10 @@ static int subflow_v4_conn_request(struct sock *sk, struct sk_buff *skb)
 	return 0;
 }
 
+#if IS_ENABLED(CONFIG_MPTCP_IPV6)
+static struct inet_connection_sock_af_ops subflow_v6_specific;
+#endif
+
 /* validate hmac received in third ACK */
 static bool subflow_hmac_valid(const struct request_sock *req,
 			       const struct tcp_options_received *rx_opt)
@@ -575,7 +579,8 @@ int mptcp_subflow_create_socket(struct sock *sk, struct socket **new_sock)
 	struct socket *sf;
 	int err;
 
-	err = sock_create_kern(net, PF_INET, SOCK_STREAM, IPPROTO_TCP, &sf);
+	err = sock_create_kern(net, sk->sk_family, SOCK_STREAM, IPPROTO_TCP,
+			       &sf);
 	if (err)
 		return err;
 
@@ -637,11 +642,15 @@ static int subflow_ulp_init(struct sock *sk)
 		goto out;
 	}
 
-	pr_debug("subflow=%p", ctx);
+	pr_debug("subflow=%p, family=%d", ctx, sk->sk_family);
 
 	tp->is_mptcp = 1;
 	ctx->icsk_af_ops = icsk->icsk_af_ops;
 	icsk->icsk_af_ops = &subflow_specific;
+#if IS_ENABLED(CONFIG_MPTCP_IPV6)
+	if (sk->sk_family == AF_INET6)
+		icsk->icsk_af_ops = &subflow_v6_specific;
+#endif
 	ctx->tcp_sk_data_ready = sk->sk_data_ready;
 	sk->sk_data_ready = subflow_data_ready;
 	sk->sk_write_space = subflow_write_space;
@@ -739,6 +748,11 @@ void mptcp_subflow_init(void)
 	subflow_specific.sk_rx_dst_set = subflow_finish_connect;
 	subflow_specific.rebuild_header = subflow_rebuild_header;
 
+#if IS_ENABLED(CONFIG_MPTCP_IPV6)
+	subflow_v6_specific = ipv6_specific;
+	subflow_v6_specific.sk_rx_dst_set = subflow_finish_connect;
+#endif
+
 	if (tcp_register_ulp(&subflow_ulp_ops) != 0)
 		panic("MPTCP: failed to register subflows to ULP\n");
 }
Signature · 1 line
2.17.2
author
#4 lore raw

PATCH 4/8 mptcp: Add IPv6 support for mptcp_poll

In reply to Peter Krystad

squashto: add mptcp_poll

Signed-off-by Peter Krystad <peter.krystad(a)linux.intel.com>
---
 net/mptcp/protocol.c | 1 +
 1 file changed, 1 insertion(+)
net/mptcp/protocol.c +1 -0
index 03f43f3a7a9a..6bc064713500 100644
@@ -982,6 +982,7 @@ int mptcpv6_init(void)
 	mptcp_v6_stream_ops = inet6_stream_ops;
 	mptcp_v6_stream_ops.bind = mptcp_bind;
 	mptcp_v6_stream_ops.connect = mptcp_stream_connect;
+	mptcp_v6_stream_ops.poll = mptcp_poll;
 
 	err = inet6_register_protosw(&mptcp_v6_protosw);
 
Signature · 1 line
2.17.2
author
#5 lore raw

PATCH 5/8 mptcp: Add IPV6 support for incoming connections

In reply to Peter Krystad

add mtpcp_accept and listent

squashto: Create SUBFLOW socket for incoming connections

Signed-off-by Peter Krystad <peter.krystad(a)linux.intel.com>

mtpcp: Add IPv6 support for for incoming connections [getname()]

squashto: Create SUBFLOW socket for incoming connections

Signed-off-by Peter Krystad <peter.krystad(a)linux.intel.com>

mtpcp: Add IPv6 support for incoming connections

squashto: Create SUBFLOW socket for incoming connections

Signed-off-by Peter Krystad <peter.krystad(a)linux.intel.com>
---
 net/mptcp/protocol.c | 35 +++++++++++++++++++++++++++++++----
 net/mptcp/subflow.c  | 42 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 73 insertions(+), 4 deletions(-)
net/mptcp/protocol.c +31 -4
index 6bc064713500..bda16c399e23 100644
@@ -16,6 +16,9 @@
 #include <net/inet_hashtables.h>
 #include <net/protocol.h>
 #include <net/tcp.h>
+#if IS_ENABLED(CONFIG_MPTCP_IPV6)
+#include <net/transp_v6.h>
+#endif
 #include <net/mptcp.h>
 #include "protocol.h"
 
@@ -764,10 +767,7 @@ static int mptcp_stream_connect(struct socket *sock, struct sockaddr *uaddr,
 {
 	struct mptcp_sock *msk = mptcp_sk(sock->sk);
 	struct socket *ssock;
-	int err = -ENOTSUPP;
-
-	if (uaddr->sa_family != AF_INET) // @@ allow only IPv4 for now
-		return err;
+	int err;
 
 	ssock = mptcp_socket_create_get(msk);
 	if (IS_ERR(ssock))
@@ -833,6 +833,30 @@ static int mptcp_v4_getname(struct socket *sock, struct sockaddr *uaddr,
 	return ret;
 }
 
+#if IS_ENABLED(CONFIG_MPTCP_IPV6)
+static int mptcp_v6_getname(struct socket *sock, struct sockaddr *uaddr,
+			    int peer)
+{
+	int ret;
+
+	if (sock->sk->sk_prot == &tcpv6_prot) {
+		/* we are being invoked from __sys_accept4 after
+		 * mptcp_accept() has accepted a non-mp-capable
+		 * subflow: sk is a tcp_sk, not mptcp.
+		 *
+		 * Hand the socket over to tcp so all further
+		 * socket ops bypass mptcp.
+		 */
+		sock->ops = &inet6_stream_ops;
+		return sock->ops->getname(sock, uaddr, peer);
+	}
+
+	ret = mptcp_getname(sock, uaddr, peer);
+
+	return ret;
+}
+#endif
+
 static int mptcp_listen(struct socket *sock, int backlog)
 {
 	struct mptcp_sock *msk = mptcp_sk(sock->sk);
@@ -983,6 +1007,9 @@ int mptcpv6_init(void)
 	mptcp_v6_stream_ops.bind = mptcp_bind;
 	mptcp_v6_stream_ops.connect = mptcp_stream_connect;
 	mptcp_v6_stream_ops.poll = mptcp_poll;
+	mptcp_v6_stream_ops.accept = mptcp_stream_accept;
+	mptcp_v6_stream_ops.getname = mptcp_v6_getname;
+	mptcp_v6_stream_ops.listen = mptcp_listen;
 
 	err = inet6_register_protosw(&mptcp_v6_protosw);
 
net/mptcp/subflow.c +42 -0

68 lines not on this page · raw message

Signature · 1 line
2.17.2
author
#6 lore raw

PATCH 6/8 mptcp: Add IPv6 support for key generation

In reply to Peter Krystad

squashto: Add key generation and token tree

Signed-off-by Peter Krystad <peter.krystad(a)linux.intel.com>
---
 net/mptcp/subflow.c | 1 +
 1 file changed, 1 insertion(+)
net/mptcp/subflow.c +1 -0
index 580cee2a5f84..a24888109ae5 100644
@@ -793,6 +793,7 @@ void mptcp_subflow_init(void)
 	subflow_v6_specific.conn_request = subflow_v6_conn_request;
 	subflow_v6_specific.syn_recv_sock = subflow_syn_recv_sock;
 	subflow_v6_specific.sk_rx_dst_set = subflow_finish_connect;
+	subflow_v6_specific.rebuild_header = subflow_rebuild_header;
 #endif
 
 	if (tcp_register_ulp(&subflow_ulp_ops) != 0)
Signature · 1 line
2.17.2
author
#7 lore raw

PATCH 7/8 mptcp: Add IPv6 support for shutdown()

In reply to Peter Krystad

squashto: Add shutdown() socket operation

Signed-off-by Peter Krystad <peter.krystad(a)linux.intel.com>
---
 net/mptcp/protocol.c | 1 +
 1 file changed, 1 insertion(+)
net/mptcp/protocol.c +1 -0
index bda16c399e23..a831e7fdb90f 100644
@@ -1010,6 +1010,7 @@ int mptcpv6_init(void)
 	mptcp_v6_stream_ops.accept = mptcp_stream_accept;
 	mptcp_v6_stream_ops.getname = mptcp_v6_getname;
 	mptcp_v6_stream_ops.listen = mptcp_listen;
+	mptcp_v6_stream_ops.shutdown = mptcp_shutdown;
 
 	err = inet6_register_protosw(&mptcp_v6_protosw);
 
Signature · 1 line
2.17.2
author
#8 lore raw

PATCH 8/8 mptcp: Add IPv6 support for new sysctl initialization

In reply to Peter Krystad

squashto: new sysctl to control the activation per NS

Signed-off-by Peter Krystad <peter.krystad(a)linux.intel.com>
---
 net/mptcp/ctrl.c     | 11 +++++++++++
 net/mptcp/protocol.c |  2 +-
 net/mptcp/protocol.h |  3 +++
 3 files changed, 15 insertions(+), 1 deletion(-)
net/mptcp/ctrl.c +11 -0
index 6023c9f722ea..8e39585d37f3 100644
@@ -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
net/mptcp/protocol.c +1 -1
index a831e7fdb90f..564a6204649e 100644
@@ -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;
 
net/mptcp/protocol.h +3 -0
index 2566858ea272..80e4cbfc389a 100644
@@ -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;
Signature · 1 line
2.17.2
#9 lore raw
In reply to Peter Krystad
Quoted 13 lines · Peter Krystad

This patchset is a replacement for the single "Add IPv6 Support" commit, with the chunks broken into seperate squash-able commits.

Peter Krystad (8):
mptcp: Add IPv6 support for MPTCP socket stubs
mptcp: Add IPv6 support for Associate MPTCP context
mptcp: Add IPV6 support for outgoing connections
mptcp: Add IPv6 support for mptcp_poll
mptcp: Add IPV6 support for incoming connections
mptcp: Add IPv6 support for key generation
mptcp: Add IPv6 support for shutdown()
mptcp: Add IPv6 support for new sysctl initialization

Quoted 7 lines
 include/net/mptcp.h  | 10 +++++++
 net/ipv6/tcp_ipv6.c  |  7 +++++
 net/mptcp/ctrl.c     | 11 ++++++++
 net/mptcp/protocol.c | 62 +++++++++++++++++++++++++++++++++++++++++---
 net/mptcp/protocol.h |  6 +++++
 net/mptcp/subflow.c  | 61 +++++++++++++++++++++++++++++++++++++++++--
 6 files changed, 151 insertions(+), 6 deletions(-)

it's hard to verify it without doing the full squash exercise, but the split LGTM.

Thanks!

Paolo

#10 lore raw

Hi Peter, Paolo,

Quoted 22 lines · Paolo Abeni
Quoted 13 lines · Peter Krystad

This patchset is a replacement for the single "Add IPv6 Support" commit, with the chunks broken into seperate squash-able commits.

Peter Krystad (8):
mptcp: Add IPv6 support for MPTCP socket stubs
mptcp: Add IPv6 support for Associate MPTCP context
mptcp: Add IPV6 support for outgoing connections
mptcp: Add IPv6 support for mptcp_poll
mptcp: Add IPV6 support for incoming connections
mptcp: Add IPv6 support for key generation
mptcp: Add IPv6 support for shutdown()
mptcp: Add IPv6 support for new sysctl initialization

Quoted 7 lines
  include/net/mptcp.h  | 10 +++++++
  net/ipv6/tcp_ipv6.c  |  7 +++++
  net/mptcp/ctrl.c     | 11 ++++++++
  net/mptcp/protocol.c | 62 +++++++++++++++++++++++++++++++++++++++++---
  net/mptcp/protocol.h |  6 +++++
  net/mptcp/subflow.c  | 61 +++++++++++++++++++++++++++++++++++++++++--
  6 files changed, 151 insertions(+), 6 deletions(-)
Quoted 2 lines

it's hard to verify it without doing the full squash exercise, but the split LGTM.

Thank you for the split and the review!
Also thank you for having put them in the right order for the rebase :)

- 920d3c461f9a: "squashed" patch 1/8 in "mptcp: Add MPTCP socket stubs"
- 6ec9145015c0: "squashed" patch 2/8 in "mptcp: Associate MPTCP context with TCP socket"
- 1c9a07550d4c: "squashed" patch 3/8 in "mptcp: Handle MP_CAPABLE options for outgoing connections"
- 65bea9aec6ac: "squashed" patch 4/8 in "mptcp: add mptcp_poll"
- e353abeb746a: "squashed" patch 5/8 in "mptcp: Create SUBFLOW socket for incoming connections"
- d1f01b804dbd: "squashed" patch 6/8 in "mptcp: Add key generation and token tree"
- 87425a0c3c06: "squashed" patch 7/8 in "mptcp: Add shutdown() socket operation"
- 16fafed481ee: conflict in t/mptcp-Implement-MPTCP-receive-path
- b6522b9ca7cf: conflict in t/mptcp-Add-handling-of-incoming-MP_JOIN-requests
- df91c7f6f3bf: "squashed" patch 8/8 in "mptcp: new sysctl to control the activation per NS"
- e963d103665b: "Signed-off-by" + "Co-developed-by"
- 023d3b14d1b5..ca1c4ffe6b8d: result

After this, "mptcp: Add IPv6 support" is almost empty:

===

net/mptcp/protocol.c +0 -0
index c7e6b9dd14df..564a6204649e 100644
@@ -751,10 +751,7 @@ static int mptcp_bind(struct socket *sock, struct 

sockaddr *uaddr, int addr_len)

  {
         struct mptcp_sock *msk = mptcp_sk(sock->sk);
         struct socket *ssock;

- int err = -ENOTSUPP;
-
- if (uaddr->sa_family != AF_INET) // @@ allow only IPv4 for now
- return err;
+ int err;

         ssock = mptcp_socket_create_get(msk);
         if (IS_ERR(ssock))

===

Can I move this to "mptcp: Create SUBFLOW socket for incoming connections"?

Tests are in progress.

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
author
#11 lore raw
Quoted 75 lines · Matthieu Baerts

Hi Peter, Paolo,

Quoted 22 lines · Paolo Abeni
Quoted 13 lines · Peter Krystad

This patchset is a replacement for the single "Add IPv6 Support" commit, with the chunks broken into seperate squash-able commits.

Peter Krystad (8):
mptcp: Add IPv6 support for MPTCP socket stubs
mptcp: Add IPv6 support for Associate MPTCP context
mptcp: Add IPV6 support for outgoing connections
mptcp: Add IPv6 support for mptcp_poll
mptcp: Add IPV6 support for incoming connections
mptcp: Add IPv6 support for key generation
mptcp: Add IPv6 support for shutdown()
mptcp: Add IPv6 support for new sysctl initialization

Quoted 7 lines
  include/net/mptcp.h  | 10 +++++++
  net/ipv6/tcp_ipv6.c  |  7 +++++
  net/mptcp/ctrl.c     | 11 ++++++++
  net/mptcp/protocol.c | 62 +++++++++++++++++++++++++++++++++++++++++---
  net/mptcp/protocol.h |  6 +++++
  net/mptcp/subflow.c  | 61 +++++++++++++++++++++++++++++++++++++++++--
  6 files changed, 151 insertions(+), 6 deletions(-)
Quoted 2 lines

it's hard to verify it without doing the full squash exercise, but the split LGTM.

Thank you for the split and the review!
Also thank you for having put them in the right order for the rebase :)

- 920d3c461f9a: "squashed" patch 1/8 in "mptcp: Add MPTCP socket stubs"
- 6ec9145015c0: "squashed" patch 2/8 in "mptcp: Associate MPTCP context with TCP socket"
- 1c9a07550d4c: "squashed" patch 3/8 in "mptcp: Handle MP_CAPABLE options for outgoing connections"
- 65bea9aec6ac: "squashed" patch 4/8 in "mptcp: add mptcp_poll"
- e353abeb746a: "squashed" patch 5/8 in "mptcp: Create SUBFLOW socket for incoming connections"
- d1f01b804dbd: "squashed" patch 6/8 in "mptcp: Add key generation and token tree"
- 87425a0c3c06: "squashed" patch 7/8 in "mptcp: Add shutdown() socket operation"
- 16fafed481ee: conflict in t/mptcp-Implement-MPTCP-receive-path
- b6522b9ca7cf: conflict in t/mptcp-Add-handling-of-incoming-MP_JOIN-requests
- df91c7f6f3bf: "squashed" patch 8/8 in "mptcp: new sysctl to control the activation per NS"
- e963d103665b: "Signed-off-by" + "Co-developed-by"
- 023d3b14d1b5..ca1c4ffe6b8d: result

After this, "mptcp: Add IPv6 support" is almost empty:

===

net/mptcp/protocol.c +1 -4
index c7e6b9dd14df..564a6204649e 100644
@@ -751,10 +751,7 @@ static int mptcp_bind(struct socket *sock, struct 
 sockaddr *uaddr, int addr_len)
  {
         struct mptcp_sock *msk = mptcp_sk(sock->sk);
         struct socket *ssock;
-       int err = -ENOTSUPP;
-
-       if (uaddr->sa_family != AF_INET) // @@ allow only IPv4 for now
-               return err;
+       int err;
 
         ssock = mptcp_socket_create_get(msk);
         if (IS_ERR(ssock))
Quoted 3 lines

===

Can I move this to "mptcp: Create SUBFLOW socket for incoming connections"?

That's the "missing chunk", yes merge this change.

Peter.

Quoted 4 lines

Tests are in progress.

Cheers,
Matt

#12 lore raw

Hi Peter,

Quoted 1 line · Peter Krystad

On Wed, 2019-11-13 at 21:44 +0100, Matthieu Baerts wrote:

[...]

Quoted 19 lines
Quoted 19 lines

After this, "mptcp: Add IPv6 support" is almost empty:

===

net/mptcp/protocol.c +1 -4
index c7e6b9dd14df..564a6204649e 100644
@@ -751,10 +751,7 @@ static int mptcp_bind(struct socket *sock, struct
 sockaddr *uaddr, int addr_len)
   {
          struct mptcp_sock *msk = mptcp_sk(sock->sk);
          struct socket *ssock;
-       int err = -ENOTSUPP;
-
-       if (uaddr->sa_family != AF_INET) // @@ allow only IPv4 for now
-               return err;
+       int err;
 
Quoted 8 lines
Quoted 6 lines
net/mptcp/protocol.c +0 -0
          ssock = mptcp_socket_create_get(msk);
          if (IS_ERR(ssock))

===

Can I move this to "mptcp: Create SUBFLOW socket for incoming connections"?

That's the "missing chunk", yes merge this change.

Thank you, just did:

- 8c31a5e1339b: "squashed" in "mptcp: Create SUBFLOW socket for incoming connections"
- add0d83fe78e..253efd541209: result (empty as expected)
- t/mptcp-Add-IPv6-support is now empty (no longer exported)

Tests are in progress.

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