diff options
author | Geliang Tang | 2022-04-22 14:55:36 -0700 |
---|---|---|
committer | David S. Miller | 2022-04-23 11:51:05 +0100 |
commit | 1761fed2567807f26fbd53032ff622f55978c7a9 (patch) | |
tree | 15eefa51b1f5192590a8bc43ad6ef086eda6a130 /net | |
parent | 31693d02b06ed2f0ac668cede16cf3258e86204e (diff) |
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 <geliang.tang@suse.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/mptcp/subflow.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c index aba260f547da..f217926f6a9c 100644 --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@ -1206,14 +1206,14 @@ fallback: /* 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; } |