Skip to content

Commit 1761fed

Browse files
geliangtangdavem330
authored andcommitted
mptcp: don't send RST for single subflow
When a bad checksum is detected and a single subflow is in use, don't send RST + MP_FAIL, send data_ack + MP_FAIL instead. So invoke tcp_send_active_reset() only when mptcp_has_another_subflow() is true. Signed-off-by: Geliang Tang <[email protected]> Signed-off-by: Mat Martineau <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 31693d0 commit 1761fed

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

net/mptcp/subflow.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,14 +1206,14 @@ static bool subflow_check_data_avail(struct sock *ssk)
12061206
/* RFC 8684 section 3.7. */
12071207
if (subflow->send_mp_fail) {
12081208
if (mptcp_has_another_subflow(ssk)) {
1209+
ssk->sk_err = EBADMSG;
1210+
tcp_set_state(ssk, TCP_CLOSE);
1211+
subflow->reset_transient = 0;
1212+
subflow->reset_reason = MPTCP_RST_EMIDDLEBOX;
1213+
tcp_send_active_reset(ssk, GFP_ATOMIC);
12091214
while ((skb = skb_peek(&ssk->sk_receive_queue)))
12101215
sk_eat_skb(ssk, skb);
12111216
}
1212-
ssk->sk_err = EBADMSG;
1213-
tcp_set_state(ssk, TCP_CLOSE);
1214-
subflow->reset_transient = 0;
1215-
subflow->reset_reason = MPTCP_RST_EMIDDLEBOX;
1216-
tcp_send_active_reset(ssk, GFP_ATOMIC);
12171217
WRITE_ONCE(subflow->data_avail, MPTCP_SUBFLOW_NODATA);
12181218
return true;
12191219
}

0 commit comments

Comments
 (0)