File tree 2 files changed +20
-0
lines changed
2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -490,4 +490,14 @@ static inline void mptcp_do_fallback(struct sock *sk)
490
490
491
491
#define pr_fallback (a ) pr_debug("%s:fallback to TCP (msk=%p)", __func__, a)
492
492
493
+ static inline bool subflow_simultaneous_connect (struct sock * sk )
494
+ {
495
+ struct mptcp_subflow_context * subflow = mptcp_subflow_ctx (sk );
496
+ struct sock * parent = subflow -> conn ;
497
+
498
+ return sk -> sk_state == TCP_ESTABLISHED &&
499
+ !mptcp_sk (parent )-> pm .server_side &&
500
+ !subflow -> conn_finished ;
501
+ }
502
+
493
503
#endif /* __MPTCP_PROTOCOL_H */
Original file line number Diff line number Diff line change @@ -1128,6 +1128,16 @@ static void subflow_state_change(struct sock *sk)
1128
1128
1129
1129
__subflow_state_change (sk );
1130
1130
1131
+ if (subflow_simultaneous_connect (sk )) {
1132
+ mptcp_do_fallback (sk );
1133
+ pr_fallback (mptcp_sk (parent ));
1134
+ subflow -> conn_finished = 1 ;
1135
+ if (inet_sk_state_load (parent ) == TCP_SYN_SENT ) {
1136
+ inet_sk_state_store (parent , TCP_ESTABLISHED );
1137
+ parent -> sk_state_change (parent );
1138
+ }
1139
+ }
1140
+
1131
1141
/* as recvmsg() does not acquire the subflow socket for ssk selection
1132
1142
* a fin packet carrying a DSS can be unnoticed if we don't trigger
1133
1143
* the data available machinery here.
You can’t perform that action at this time.
0 commit comments