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.
Showing the changes to include/uapi (1 of 9 files). Show all
Unified · Split
| @@ -174,10 +174,21 @@ enum mptcp_event_attr { · 173 unmodified lines | ||
| 174 | 174 | MPTCP_ATTR_FLAGS, /* u16 */ |
| 175 | 175 | MPTCP_ATTR_TIMEOUT, /* u32 */ |
| 176 | 176 | MPTCP_ATTR_IF_IDX, /* s32 */ |
| 177 | + MPTCP_ATTR_RESET_REASON,/* u32 */ | |
| 178 | + MPTCP_ATTR_RESET_FLAGS, /* u32 */ | |
| 177 | 179 | |
| 178 | 180 | __MPTCP_ATTR_AFTER_LAST |
| 179 | 181 | }; |
| 180 | 182 | |
| 181 | 183 | #define MPTCP_ATTR_MAX (__MPTCP_ATTR_AFTER_LAST - 1) |
| 182 | 184 | |
| 185 | +/* MPTCP Reset reason codes, rfc8684 */ | |
| 186 | +#define MPTCP_RST_EUNSPEC 0 | |
| 187 | +#define MPTCP_RST_EMPTCP 1 | |
| 188 | +#define MPTCP_RST_ERESOURCE 2 | |
| 189 | +#define MPTCP_RST_EPROHIBIT 3 | |
| 190 | +#define MPTCP_RST_EWQ2BIG 4 | |
| 191 | +#define MPTCP_RST_EBADPERF 5 | |
| 192 | +#define MPTCP_RST_EMIDDLEBOX 6 | |
| 193 | + | |
| 183 | 194 | #endif /* _UAPI_MPTCP_H */ |