Skip to content

Commit

Permalink
mptcp: don't send RST for single subflow
Browse files Browse the repository at this point in the history
[ Upstream commit 1761fed ]

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]>
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
geliangtang authored and Sasha Levin committed Aug 2, 2022
1 parent 6903559 commit 79a1f7c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions net/mptcp/subflow.c
Original file line number Diff line number Diff line change
Expand Up @@ -1221,14 +1221,14 @@ static bool subflow_check_data_avail(struct sock *ssk)
/* RFC 8684 section 3.7. */
if (subflow->send_mp_fail) {
if (mptcp_has_another_subflow(ssk)) {
ssk->sk_err = EBADMSG;
tcp_set_state(ssk, TCP_CLOSE);
subflow->reset_transient = 0;
subflow->reset_reason = MPTCP_RST_EMIDDLEBOX;
tcp_send_active_reset(ssk, GFP_ATOMIC);
while ((skb = skb_peek(&ssk->sk_receive_queue)))
sk_eat_skb(ssk, skb);
}
ssk->sk_err = EBADMSG;
tcp_set_state(ssk, TCP_CLOSE);
subflow->reset_transient = 0;
subflow->reset_reason = MPTCP_RST_EMIDDLEBOX;
tcp_send_active_reset(ssk, GFP_ATOMIC);
WRITE_ONCE(subflow->data_avail, MPTCP_SUBFLOW_NODATA);
return true;
}
Expand Down

0 comments on commit 79a1f7c

Please sign in to comment.