diff mbox series

[4/4] mptcp: init new_ctx->icsk_af_ops() in subflow_ulp_clone()

Message ID 7b21ca56785decb50da4b6432009bf039add80fb.1573471458.git.pabeni@redhat.com
State Accepted, archived
Delegated to: Matthieu Baerts
Headers show
Series mptcp: some cleanups | expand

Commit Message

Paolo Abeni Nov. 11, 2019, 11:29 a.m. UTC
Currently inited in "mptcp: Add key generation and token tree",
causing transient build failure, move here for consistency
and fix build issue

Squash-to: "mptcp: Create SUBFLOW socket for incoming connections"
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
 net/mptcp/subflow.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
index 5c0594d09cc5..869010587df4 100644
--- a/net/mptcp/subflow.c
+++ b/net/mptcp/subflow.c
@@ -212,6 +212,7 @@  static void subflow_ulp_clone(const struct request_sock *req,
 			      const gfp_t priority)
 {
 	struct mptcp_subflow_request_sock *subflow_req = mptcp_subflow_rsk(req);
+	struct mptcp_subflow_context *old_ctx = mptcp_subflow_ctx(newsk);
 	struct mptcp_subflow_context *new_ctx;
 
 	/* newsk->sk_socket is NULL at this point */
@@ -221,6 +222,7 @@  static void subflow_ulp_clone(const struct request_sock *req,
 
 	new_ctx->conn = NULL;
 	new_ctx->conn_finished = 1;
+	new_ctx->icsk_af_ops = old_ctx->icsk_af_ops;
 
 	if (subflow_req->mp_capable) {
 		new_ctx->mp_capable = 1;