5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Paolo Abeni pabeni@redhat.com
commit 0c1f78a49af721490a5ad70b73e8b4d382465dae upstream.
The current accounting for MP_FAIL and FASTCLOSE is not very accurate: both can be increased even when the related option is not really sent. Move the accounting into the correct place.
Fixes: eb7f33654dc1 ("mptcp: add the mibs for MP_FAIL") Fixes: 1e75629cb964 ("mptcp: add the mibs for MP_FASTCLOSE") Signed-off-by: Paolo Abeni pabeni@redhat.com Signed-off-by: Mat Martineau mathew.j.martineau@linux.intel.com Signed-off-by: Jakub Kicinski kuba@kernel.org [ Conflicts, because commit f284c0c77321 ("mptcp: implement fastclose xmit path") is not in this version. That's OK, the new helper added by this commit doesn't need to be modified. ] Signed-off-by: Matthieu Baerts (NGI0) matttbe@kernel.org Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org --- net/mptcp/options.c | 1 + net/mptcp/subflow.c | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-)
--- a/net/mptcp/options.c +++ b/net/mptcp/options.c @@ -793,6 +793,7 @@ static bool mptcp_established_options_mp opts->fail_seq = subflow->map_seq;
pr_debug("MP_FAIL fail_seq=%llu\n", opts->fail_seq); + MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_MPFAILTX);
return true; } --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@ -963,10 +963,8 @@ static enum mapping_status validate_data subflow->map_data_csum); if (unlikely(csum)) { MPTCP_INC_STATS(sock_net(ssk), MPTCP_MIB_DATACSUMERR); - if (subflow->mp_join || subflow->valid_csum_seen) { + if (subflow->mp_join || subflow->valid_csum_seen) subflow->send_mp_fail = 1; - MPTCP_INC_STATS(sock_net(ssk), MPTCP_MIB_MPFAILTX); - } return subflow->mp_join ? MAPPING_INVALID : MAPPING_DUMMY; }