ENUM SK_RST_REASON(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so bestie, we're in the Kernel API Manual and this page is all about enum sk_rst_reason β€” literally the reasons of socket reset. it's giving β€œwhy did this socket get reset?” energy, and honestly it ate. πŸ’…


✨ SYNOPSIS ✨

enum sk_rst_reason {
    SK_RST_REASON_NOT_SPECIFIED ,
    SK_RST_REASON_NO_SOCKET ,
    SK_RST_REASON_TCP_INVALID_ACK_SEQUENCE ,
    SK_RST_REASON_TCP_RFC7323_PAWS ,
    SK_RST_REASON_TCP_TOO_OLD_ACK ,
    SK_RST_REASON_TCP_ACK_UNSENT_DATA ,
    SK_RST_REASON_TCP_FLAGS ,
    SK_RST_REASON_TCP_OLD_ACK ,
    SK_RST_REASON_TCP_ABORT_ON_DATA ,
    SK_RST_REASON_TCP_TIMEWAIT_SOCKET ,
    SK_RST_REASON_INVALID_SYN ,
    SK_RST_REASON_TCP_ABORT_ON_CLOSE ,
    SK_RST_REASON_TCP_ABORT_ON_LINGER ,
    SK_RST_REASON_TCP_ABORT_ON_MEMORY ,
    SK_RST_REASON_TCP_STATE ,
    SK_RST_REASON_TCP_KEEPALIVE_TIMEOUT ,
    SK_RST_REASON_TCP_DISCONNECT_WITH_DATA ,
    SK_RST_REASON_MPTCP_RST_EUNSPEC ,
    SK_RST_REASON_MPTCP_RST_EMPTCP ,
    SK_RST_REASON_MPTCP_RST_ERESOURCE ,
    SK_RST_REASON_MPTCP_RST_EPROHIBIT ,
    SK_RST_REASON_MPTCP_RST_EWQ2BIG ,
    SK_RST_REASON_MPTCP_RST_EBADPERF ,
    SK_RST_REASON_MPTCP_RST_EMIDDLEBOX ,
    SK_RST_REASON_ERROR ,
    SK_RST_REASON_MAX

};

πŸŽ€ Constants πŸŽ€

  • SK_RST_REASON_NOT_SPECIFIED β€” the reset reason is not specified. vague queen behavior, honestly. πŸ™ˆ
  • SK_RST_REASON_NO_SOCKET β€” no valid socket that can be used.
  • SK_RST_REASON_TCP_INVALID_ACK_SEQUENCE β€” not acceptable ACK SEQ field because ack sequence is not in the window between snd_una and snd_nxt.
  • SK_RST_REASON_TCP_RFC7323_PAWS β€” PAWS check, corresponding to LINUX_MIB_PAWSESTABREJECTED, LINUX_MIB_PAWSACTIVEREJECTED.
  • SK_RST_REASON_TCP_TOO_OLD_ACK β€” TCP ACK is too old. not the ack getting carded at the door 😭
  • SK_RST_REASON_TCP_ACK_UNSENT_DATA β€” TCP ACK for data we haven't sent yet.
  • SK_RST_REASON_TCP_FLAGS β€” TCP flags invalid.
  • SK_RST_REASON_TCP_OLD_ACK β€” TCP ACK is old, but in window. lowkey valid, highkey old. πŸ’€
  • SK_RST_REASON_TCP_ABORT_ON_DATA β€” abort on data corresponding to LINUX_MIB_TCPABORTONDATA.
  • SK_RST_REASON_TCP_TIMEWAIT_SOCKET β€” happen on the timewait socket.
  • SK_RST_REASON_INVALID_SYN β€” receive bad syn packet. RFC 793 says if the state is not CLOSED/LISTEN/SYN-SENT then "fourth, check the SYN bit,...If the SYN is in the window it is an error, send a reset".
  • SK_RST_REASON_TCP_ABORT_ON_CLOSE β€” abort on close corresponding to LINUX_MIB_TCPABORTONCLOSE.
  • SK_RST_REASON_TCP_ABORT_ON_LINGER β€” abort on linger corresponding to LINUX_MIB_TCPABORTONLINGER.
  • SK_RST_REASON_TCP_ABORT_ON_MEMORY β€” abort on memory corresponding to LINUX_MIB_TCPABORTONMEMORY.
  • SK_RST_REASON_TCP_STATE β€” abort on tcp state. please see RFC 9293 for all possible reset conditions.
  • SK_RST_REASON_TCP_KEEPALIVE_TIMEOUT β€” time to timeout. when we have already run out of all the chances, which means keepalive timeout, we have to reset the connection.
  • SK_RST_REASON_TCP_DISCONNECT_WITH_DATA β€” disconnect when write queue is not empty. it means user has written data into the write queue when doing disconnecting, so we have to send an RST.
  • SK_RST_REASON_MPTCP_RST_EUNSPEC β€” Unspecified error. This is the default error; it implies that the subflow is no longer available. The presence of this option shows that the RST was generated by an MPTCP-aware device.
  • SK_RST_REASON_MPTCP_RST_EMPTCP β€” MPTCP-specific error. An error has been detected in the processing of MPTCP options. This is the usual reason code to return in the cases where a RST is being sent to close a subflow because of an invalid response.
  • SK_RST_REASON_MPTCP_RST_ERESOURCE β€” Lack of resources. This code indicates that the sending host does not have enough resources to support the terminated subflow.
  • SK_RST_REASON_MPTCP_RST_EPROHIBIT β€” Administratively prohibited. This code indicates that the requested subflow is prohibited by the policies of the sending host.
  • SK_RST_REASON_MPTCP_RST_EWQ2BIG β€” Too much outstanding data. This code indicates that there is an excessive amount of data that needs to be transmitted over the terminated subflow while having already been acknowledged over one or more other subflows. This may occur if a path has been unavailable for a short period and it is more efficient to reset and start again than it is to retransmit the queued data.
  • SK_RST_REASON_MPTCP_RST_EBADPERF β€” Unacceptable performance. This code indicates that the performance of this subflow was too low compared to the other subflows of this Multipath TCP connection.
  • SK_RST_REASON_MPTCP_RST_EMIDDLEBOX β€” Middlebox interference. Middlebox interference has been detected over this subflow, making MPTCP signaling invalid. For example, this may be sent if the checksum does not validate.
  • SK_RST_REASON_ERROR β€” unexpected error happens.
  • SK_RST_REASON_MAX β€” Maximum of socket reset reasons. It shouldn't be used as a real 'reason'.
bestie, for real, SK_RST_REASON_MAX is not a real reason. do not use it like one. it's the ceiling, not the vibe. πŸ›‘

πŸ’« Description πŸ’«

The reasons of sk reset, which are used in TCP/MPTCP protocols.

There are three parts in order:

  1. skb drop reasons: relying on drop reasons for such as passive reset
  2. independent reset reasons: such as active reset reasons
  3. reset reasons in MPTCP: only for MPTCP use

🌈 SEE ALSO 🌈

  • Kernel file ./include/net/rstreason.h β€” go read it, iykyk 🧚

mwah πŸ’‹ source/version: ./include/net; date: October 2026; page: enum sk_rst_reason(9). bye bestie 🫢

πŸ“¦ where this page comes from