History

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.

Florian Westphal committed 5 years ago

Commit dc87efd1 parent 781bf139 files · +180 −19Browse files

Showing the changes to include/uapi (1 of 9 files). Show all

Unified · Split

include/uapi/linux/mptcp.h+11−0
@@ -174,10 +174,21 @@ enum mptcp_event_attr { · 173 unmodified lines
174 MPTCP_ATTR_FLAGS, /* u16 */174 MPTCP_ATTR_FLAGS, /* u16 */
175 MPTCP_ATTR_TIMEOUT, /* u32 */175 MPTCP_ATTR_TIMEOUT, /* u32 */
176 MPTCP_ATTR_IF_IDX, /* s32 */176 MPTCP_ATTR_IF_IDX, /* s32 */
177 MPTCP_ATTR_RESET_REASON,/* u32 */
178 MPTCP_ATTR_RESET_FLAGS, /* u32 */
177 179
178 __MPTCP_ATTR_AFTER_LAST180 __MPTCP_ATTR_AFTER_LAST
179};181};
180 182
181#define MPTCP_ATTR_MAX (__MPTCP_ATTR_AFTER_LAST - 1)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#endif /* _UAPI_MPTCP_H */194#endif /* _UAPI_MPTCP_H */