summaryrefslogtreecommitdiffstats
path: root/net/mptcp/protocol.c
diff options
context:
space:
mode:
authorJason Xing <kernelxing@tencent.com>2024-04-25 11:13:39 +0800
committerPaolo Abeni <pabeni@redhat.com>2024-04-26 15:34:00 +0200
commit215d40248bde5562a21e4c6cdeaeca0495c9365a (patch)
tree726795dc19b0e8b382ca82c213227cdda6bd07b8 /net/mptcp/protocol.c
parent3e140491dd80d8643261a21efde3ce2ff6fb9fdf (diff)
downloadlinux-stable-215d40248bde5562a21e4c6cdeaeca0495c9365a.tar.gz
linux-stable-215d40248bde5562a21e4c6cdeaeca0495c9365a.tar.bz2
linux-stable-215d40248bde5562a21e4c6cdeaeca0495c9365a.zip
mptcp: introducing a helper into active reset logic
Since we have mapped every mptcp reset reason definition in enum sk_rst_reason, introducing a new helper can cover some missing places where we have already set the subflow->reset_reason. Note: using SK_RST_REASON_NOT_SPECIFIED is the same as SK_RST_REASON_MPTCP_RST_EUNSPEC. They are both unknown. So we can convert it directly. Suggested-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Jason Xing <kernelxing@tencent.com> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/mptcp/protocol.c')
-rw-r--r--net/mptcp/protocol.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 065967086492..4b13ca362efa 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -21,7 +21,6 @@
#endif
#include <net/mptcp.h>
#include <net/xfrm.h>
-#include <net/rstreason.h>
#include <asm/ioctls.h>
#include "protocol.h"
#include "mib.h"
@@ -2570,8 +2569,7 @@ static void mptcp_check_fastclose(struct mptcp_sock *msk)
slow = lock_sock_fast(tcp_sk);
if (tcp_sk->sk_state != TCP_CLOSE) {
- tcp_send_active_reset(tcp_sk, GFP_ATOMIC,
- SK_RST_REASON_NOT_SPECIFIED);
+ mptcp_send_active_reset_reason(tcp_sk);
tcp_set_state(tcp_sk, TCP_CLOSE);
}
unlock_sock_fast(tcp_sk, slow);