summaryrefslogtreecommitdiffstats
path: root/net/mptcp
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2020-07-23 13:02:29 +0200
committerDavid S. Miller <davem@davemloft.net>2020-07-23 11:47:24 -0700
commitb0977bb268db1df6decd3405903ca500721cdc5f (patch)
treed05863e5b8a40616ab916126dcbe0138546e25f3 /net/mptcp
parent205a55f4e65353dd4846547d376a6f85cdda3d04 (diff)
downloadlinux-b0977bb268db1df6decd3405903ca500721cdc5f.tar.bz2
subflow: always init 'rel_write_seq'
Currently we do not init the subflow write sequence for MP_JOIN subflows. This will cause bad mapping being generated as soon as we will use non backup subflow. Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Tested-by: Christoph Paasch <cpaasch@apple.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mptcp')
-rw-r--r--net/mptcp/protocol.c1
-rw-r--r--net/mptcp/subflow.c1
2 files changed, 1 insertions, 1 deletions
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index f0b0b503c262..59c0eef807b3 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -1814,7 +1814,6 @@ void mptcp_finish_connect(struct sock *ssk)
ack_seq++;
subflow->map_seq = ack_seq;
subflow->map_subflow_seq = 1;
- subflow->rel_write_seq = 1;
/* the socket is not connected yet, no msk/subflow ops can access/race
* accessing the field below
diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
index 519122e66f17..84e70806b250 100644
--- a/net/mptcp/subflow.c
+++ b/net/mptcp/subflow.c
@@ -200,6 +200,7 @@ static void subflow_finish_connect(struct sock *sk, const struct sk_buff *skb)
if (subflow->conn_finished)
return;
+ subflow->rel_write_seq = 1;
subflow->conn_finished = 1;
subflow->ssn_offset = TCP_SKB_CB(skb)->seq;
pr_debug("subflow=%p synack seq=%x", subflow, subflow->ssn_offset);