ENUM SK_RST_REASON(9)
π 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 betweensnd_unaandsnd_nxt.SK_RST_REASON_TCP_RFC7323_PAWSβ PAWS check, corresponding toLINUX_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 toLINUX_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 notCLOSED/LISTEN/SYN-SENTthen"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 toLINUX_MIB_TCPABORTONCLOSE.SK_RST_REASON_TCP_ABORT_ON_LINGERβ abort on linger corresponding toLINUX_MIB_TCPABORTONLINGER.SK_RST_REASON_TCP_ABORT_ON_MEMORYβ abort on memory corresponding toLINUX_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:
- skb drop reasons: relying on drop reasons for such as passive reset
- independent reset reasons: such as active reset reasons
- 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms