summaryrefslogtreecommitdiffstats
path: root/net/mptcp/protocol.h
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2020-01-21 16:56:33 -0800
committerDavid S. Miller <davem@davemloft.net>2020-01-24 13:44:08 +0100
commit8ab183deb26a3b79f8021afa9e83cc1bbd812031 (patch)
tree85962ea27c8820b48348119223d321b471627f4c /net/mptcp/protocol.h
parentd22f4988ffecbe284e4d00e897525adbd0edd801 (diff)
downloadblackbird-op-linux-8ab183deb26a3b79f8021afa9e83cc1bbd812031.tar.gz
blackbird-op-linux-8ab183deb26a3b79f8021afa9e83cc1bbd812031.zip
mptcp: cope with later TCP fallback
With MPTCP v1, passive connections can fallback to TCP after the subflow becomes established: syn + MP_CAPABLE -> <- syn, ack + MP_CAPABLE ack, seq = 3 -> // OoO packet is accepted because in-sequence // passive socket is created, is in ESTABLISHED // status and tentatively as MP_CAPABLE ack, seq = 2 -> // no MP_CAPABLE opt, subflow should fallback to TCP We can't use the 'subflow' socket fallback, as we don't have it available for passive connection. Instead, when the fallback is detected, replace the mptcp socket with the underlying TCP subflow. Beyond covering the above scenario, it makes a TCP fallback socket as efficient as plain TCP ones. Co-developed-by: Florian Westphal <fw@strlen.de> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Christoph Paasch <cpaasch@apple.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mptcp/protocol.h')
-rw-r--r--net/mptcp/protocol.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index 10eaa7c7381b..8a99a2930284 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -73,6 +73,7 @@ struct mptcp_sock {
struct list_head conn_list;
struct skb_ext *cached_ext; /* for the next sendmsg */
struct socket *subflow; /* outgoing connect/listener/!mp_capable */
+ struct sock *first;
};
#define mptcp_for_each_subflow(__msk, __subflow) \
OpenPOWER on IntegriCloud