diff options
| author | Jason Xing <kernelxing@tencent.com> | 2024-04-25 11:13:39 +0800 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2024-04-26 15:34:00 +0200 |
| commit | 215d40248bde5562a21e4c6cdeaeca0495c9365a (patch) | |
| tree | 726795dc19b0e8b382ca82c213227cdda6bd07b8 /net/mptcp/subflow.c | |
| parent | 3e140491dd80d8643261a21efde3ce2ff6fb9fdf (diff) | |
| download | linux-215d40248bde5562a21e4c6cdeaeca0495c9365a.tar.gz linux-215d40248bde5562a21e4c6cdeaeca0495c9365a.tar.bz2 linux-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/subflow.c')
| -rw-r--r-- | net/mptcp/subflow.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c index fb7abf2d01ca..97ec44d1df30 100644 --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@ -20,7 +20,6 @@ #include <net/transp_v6.h> #endif #include <net/mptcp.h> -#include <net/rstreason.h> #include "protocol.h" #include "mib.h" @@ -424,7 +423,7 @@ void mptcp_subflow_reset(struct sock *ssk) /* must hold: tcp_done() could drop last reference on parent */ sock_hold(sk); - tcp_send_active_reset(ssk, GFP_ATOMIC, SK_RST_REASON_NOT_SPECIFIED); + mptcp_send_active_reset_reason(ssk); tcp_done(ssk); if (!test_and_set_bit(MPTCP_WORK_CLOSE_SUBFLOW, &mptcp_sk(sk)->flags)) mptcp_schedule_work(sk); @@ -1362,8 +1361,7 @@ reset: tcp_set_state(ssk, TCP_CLOSE); while ((skb = skb_peek(&ssk->sk_receive_queue))) sk_eat_skb(ssk, skb); - tcp_send_active_reset(ssk, GFP_ATOMIC, - SK_RST_REASON_NOT_SPECIFIED); + mptcp_send_active_reset_reason(ssk); WRITE_ONCE(subflow->data_avail, false); return false; } |
