diff mbox series

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

Message ID 20191113064518.4823-3-peter.krystad@linux.intel.com
State Accepted, archived
Delegated to: Matthieu Baerts
Headers show
Series [1/8] mptcp: Add IPv6 support for MPTCP socket stubs | expand

Commit Message

Peter Krystad Nov. 13, 2019, 6:45 a.m. UTC
squashto: Associate MPTCP context with TCP socket

Signed-off-by: Peter Krystad <peter.krystad@linux.intel.com>
---
 net/mptcp/protocol.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index aa8444c2dd71..03f43f3a7a9a 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -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;