From 08c571d0bb7622c1b6f23e7b3eb42cd6f85ad86d Mon Sep 17 00:00:00 2001 From: Matthieu Baerts Date: Sat, 2 Apr 2022 11:03:14 +0200 Subject: [PATCH] Revert "mptcp: Handle fallback while meta is closed" This reverts commit 7ea6f5f566cf18198ecf5c8b95400c89a5284174. This was not correct to do the check in mptcp_sub_force_close_all(). Only some of these calls should have this checks, not the one sending the active reset for example. Signed-off-by: Matthieu Baerts --- include/net/mptcp.h | 6 ------ net/mptcp/mptcp_input.c | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/include/net/mptcp.h b/include/net/mptcp.h index f83f9856e58b..06e2602927c6 100644 --- a/include/net/mptcp.h +++ b/include/net/mptcp.h @@ -984,12 +984,6 @@ static inline void mptcp_sub_force_close_all(struct mptcp_cb *mpcb, { struct sock *sk_it, *tmp; - /* It can happen that the meta is already closed. In that case, don't - * keep the subflow alive - close everything! - */ - if (mpcb->meta_sk->sk_state == TCP_CLOSE) - except = NULL; - mptcp_for_each_sk_safe(mpcb, sk_it, tmp) { if (sk_it != except) mptcp_send_reset(sk_it); diff --git a/net/mptcp/mptcp_input.c b/net/mptcp/mptcp_input.c index d9d3ec72261d..28a8aa2f6c11 100644 --- a/net/mptcp/mptcp_input.c +++ b/net/mptcp/mptcp_input.c @@ -1623,11 +1623,11 @@ bool mptcp_handle_ack_in_infinite(struct sock *sk, const struct sk_buff *skb, if (!(flag & MPTCP_FLAG_DATA_ACKED)) return false; - pr_debug("%s %#x will fallback - pi %d, src %pI4:%u dst %pI4:%u rcv_nxt %u\n", + pr_debug("%s %#x will fallback - pi %d, src %pI4:%u dst %pI4:%u rcv_nxt %u from %pS\n", __func__, mpcb->mptcp_loc_token, tp->mptcp->path_index, &inet_sk(sk)->inet_saddr, ntohs(inet_sk(sk)->inet_sport), &inet_sk(sk)->inet_daddr, ntohs(inet_sk(sk)->inet_dport), - tp->rcv_nxt); + tp->rcv_nxt, __builtin_return_address(0)); if (!is_master_tp(tp)) { MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_FBACKSUB); return true;