diff mbox series

[1/4] mptcp: move mp_capable initialization at subflow_init_req() start

Message ID a1364a4a7515883497bb0b99db81eb1ca7dd73f1.1573488686.git.pabeni@redhat.com
State Superseded, archived
Headers show
Series [1/4] mptcp: move mp_capable initialization at subflow_init_req() start | expand

Commit Message

Paolo Abeni Nov. 11, 2019, 4:53 p.m. UTC
This will avoid moving the code in later patch and makes disabling
with md5 easier

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

Patch

diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
index 869010587df4..9b56fe9a83f2 100644
--- a/net/mptcp/subflow.c
+++ b/net/mptcp/subflow.c
@@ -28,6 +28,8 @@  static void subflow_init_req(struct request_sock *req,
 	memset(&rx_opt.mptcp, 0, sizeof(rx_opt.mptcp));
 	mptcp_get_options(skb, &rx_opt);
 
+	subflow_req->mp_capable = 0;
+
 	if (rx_opt.mptcp.mp_capable && listener->request_mptcp) {
 		subflow_req->mp_capable = 1;
 		if (rx_opt.mptcp.version >= listener->request_version)
@@ -35,8 +37,6 @@  static void subflow_init_req(struct request_sock *req,
 		else
 			subflow_req->version = rx_opt.mptcp.version;
 		subflow_req->remote_key = rx_opt.mptcp.sndr_key;
-	} else {
-		subflow_req->mp_capable = 0;
 	}
 }