Skip to content

Commit 06f9a43

Browse files
Paolo Abenikuba-moo
Paolo Abeni
authored andcommitted
mptcp: always parse mptcp options for MPC reqsk
In subflow_syn_recv_sock() we currently skip options parsing for OoO packet, given that such packets may not carry the relevant MPC option. If the peer generates an MPC+data TSO packet and some of the early segments are lost or get reorder, we server will ignore the peer key, causing transient, unexpected fallback to TCP. The solution is always parsing the incoming MPTCP options, and do the fallback only for in-order packets. This actually cleans the existing code a bit. Fixes: d22f498 ("mptcp: process MP_CAPABLE data option") Reported-by: Matthieu Baerts <[email protected]> Signed-off-by: Paolo Abeni <[email protected]> Signed-off-by: Mat Martineau <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent b5941f0 commit 06f9a43

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

net/mptcp/subflow.c

+8-9
Original file line numberDiff line numberDiff line change
@@ -630,21 +630,20 @@ static struct sock *subflow_syn_recv_sock(const struct sock *sk,
630630

631631
/* if the sk is MP_CAPABLE, we try to fetch the client key */
632632
if (subflow_req->mp_capable) {
633-
if (TCP_SKB_CB(skb)->seq != subflow_req->ssn_offset + 1) {
634-
/* here we can receive and accept an in-window,
635-
* out-of-order pkt, which will not carry the MP_CAPABLE
636-
* opt even on mptcp enabled paths
637-
*/
638-
goto create_msk;
639-
}
640-
633+
/* we can receive and accept an in-window, out-of-order pkt,
634+
* which may not carry the MP_CAPABLE opt even on mptcp enabled
635+
* paths: always try to extract the peer key, and fallback
636+
* for packets missing it.
637+
* Even OoO DSS packets coming legitly after dropped or
638+
* reordered MPC will cause fallback, but we don't have other
639+
* options.
640+
*/
641641
mptcp_get_options(skb, &mp_opt);
642642
if (!mp_opt.mp_capable) {
643643
fallback = true;
644644
goto create_child;
645645
}
646646

647-
create_msk:
648647
new_msk = mptcp_sk_clone(listener->conn, &mp_opt, req);
649648
if (!new_msk)
650649
fallback = true;

0 commit comments

Comments
 (0)