aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/mptcp.h
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2021-04-01 16:19:44 -0700
committerDavid S. Miller <davem@davemloft.net>2021-04-02 14:21:50 -0700
commitdc87efdb1a5cd46134a9d490480160e303bc6eef (patch)
tree57040990350f1bf27ddecf5f015c445fcf4b888f /include/uapi/linux/mptcp.h
parentmptcp: remove unneeded check on first subflow (diff)
downloadlinux-dev-dc87efdb1a5cd46134a9d490480160e303bc6eef.tar.xz
linux-dev-dc87efdb1a5cd46134a9d490480160e303bc6eef.zip
mptcp: add mptcp reset option support
The MPTCP reset option allows to carry a mptcp-specific error code that provides more information on the nature of a connection reset. Reset option data received gets stored in the subflow context so it can be sent to userspace via the 'subflow closed' netlink event. When a subflow is closed, the desired error code that should be sent to the peer is also placed in the subflow context structure. If a reset is sent before subflow establishment could complete, e.g. on HMAC failure during an MP_JOIN operation, the mptcp skb extension is used to store the reset information. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux/mptcp.h')
-rw-r--r--include/uapi/linux/mptcp.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/uapi/linux/mptcp.h b/include/uapi/linux/mptcp.h
index e1172c1ffdfd..8eb3c0844bff 100644
--- a/include/uapi/linux/mptcp.h
+++ b/include/uapi/linux/mptcp.h
@@ -174,10 +174,21 @@ enum mptcp_event_attr {
MPTCP_ATTR_FLAGS, /* u16 */
MPTCP_ATTR_TIMEOUT, /* u32 */
MPTCP_ATTR_IF_IDX, /* s32 */
+ MPTCP_ATTR_RESET_REASON,/* u32 */
+ MPTCP_ATTR_RESET_FLAGS, /* u32 */
__MPTCP_ATTR_AFTER_LAST
};
#define MPTCP_ATTR_MAX (__MPTCP_ATTR_AFTER_LAST - 1)
+/* MPTCP Reset reason codes, rfc8684 */
+#define MPTCP_RST_EUNSPEC 0
+#define MPTCP_RST_EMPTCP 1
+#define MPTCP_RST_ERESOURCE 2
+#define MPTCP_RST_EPROHIBIT 3
+#define MPTCP_RST_EWQ2BIG 4
+#define MPTCP_RST_EBADPERF 5
+#define MPTCP_RST_EMIDDLEBOX 6
+
#endif /* _UAPI_MPTCP_H */