Blame SOURCES/workaround-build-issues-uapi.patch

0d2bc5
--- a/configure.ac
0d2bc5
+++ b/configure.ac
0d2bc5
@@ -207,8 +207,7 @@ AC_CHECK_HEADERS([linux/mptcp.h],
0d2bc5
     AX_CHECK_DEFINE(
0d2bc5
         [linux/mptcp.h],
0d2bc5
         [MPTCP_PM_NAME],
0d2bc5
-        [AC_DEFINE([HAVE_LINUX_MPTCP_H_UPSTREAM], [1])
0d2bc5
-         AX_CHECK_DEFINE([linux/mptcp.h],
0d2bc5
+        [AX_CHECK_DEFINE([linux/mptcp.h],
0d2bc5
                          [MPTCP_PM_EV_GRP_NAME],
0d2bc5
                          [AC_DEFINE([HAVE_LINUX_MPTCP_H_UPSTREAM_EVENTS],
0d2bc5
                                     [1])
0d2bc5
--- a/include/linux/mptcp_upstream.h
0d2bc5
+++ b/include/linux/mptcp_upstream.h
0d2bc5
@@ -2,8 +2,16 @@
0d2bc5
 #ifndef _UAPI_MPTCP_H
0d2bc5
 #define _UAPI_MPTCP_H
0d2bc5
 
0d2bc5
+#ifndef __KERNEL__
0d2bc5
+#include <netinet/in.h>		/* for sockaddr_in and sockaddr_in6	*/
0d2bc5
+#include <sys/socket.h>		/* for struct sockaddr			*/
0d2bc5
+#endif
0d2bc5
+
0d2bc5
 #include <linux/const.h>
0d2bc5
 #include <linux/types.h>
0d2bc5
+#include <linux/in.h>		/* for sockaddr_in			*/
0d2bc5
+#include <linux/in6.h>		/* for sockaddr_in6			*/
0d2bc5
+#include <linux/socket.h>	/* for sockaddr_storage and sa_family	*/
0d2bc5
 
0d2bc5
 #define MPTCP_SUBFLOW_FLAG_MCAP_REM		_BITUL(0)
0d2bc5
 #define MPTCP_SUBFLOW_FLAG_MCAP_LOC		_BITUL(1)
0d2bc5
@@ -48,6 +56,9 @@ enum {
0d2bc5
 	MPTCP_PM_ATTR_ADDR,				/* nested address */
0d2bc5
 	MPTCP_PM_ATTR_RCV_ADD_ADDRS,			/* u32 */
0d2bc5
 	MPTCP_PM_ATTR_SUBFLOWS,				/* u32 */
0d2bc5
+	MPTCP_PM_ATTR_TOKEN,				/* u32 */
0d2bc5
+	MPTCP_PM_ATTR_LOC_ID,				/* u8 */
0d2bc5
+	MPTCP_PM_ATTR_ADDR_REMOTE,			/* nested address */
0d2bc5
 
0d2bc5
 	__MPTCP_PM_ATTR_MAX
0d2bc5
 };
0d2bc5
@@ -73,6 +84,8 @@ enum {
0d2bc5
 #define MPTCP_PM_ADDR_FLAG_SIGNAL			(1 << 0)
0d2bc5
 #define MPTCP_PM_ADDR_FLAG_SUBFLOW			(1 << 1)
0d2bc5
 #define MPTCP_PM_ADDR_FLAG_BACKUP			(1 << 2)
0d2bc5
+#define MPTCP_PM_ADDR_FLAG_FULLMESH			(1 << 3)
0d2bc5
+#define MPTCP_PM_ADDR_FLAG_IMPLICIT			(1 << 4)
0d2bc5
 
0d2bc5
 enum {
0d2bc5
 	MPTCP_PM_CMD_UNSPEC,
0d2bc5
@@ -84,6 +97,10 @@ enum {
0d2bc5
 	MPTCP_PM_CMD_SET_LIMITS,
0d2bc5
 	MPTCP_PM_CMD_GET_LIMITS,
0d2bc5
 	MPTCP_PM_CMD_SET_FLAGS,
0d2bc5
+	MPTCP_PM_CMD_ANNOUNCE,
0d2bc5
+	MPTCP_PM_CMD_REMOVE,
0d2bc5
+	MPTCP_PM_CMD_SUBFLOW_CREATE,
0d2bc5
+	MPTCP_PM_CMD_SUBFLOW_DESTROY,
0d2bc5
 
0d2bc5
 	__MPTCP_PM_CMD_AFTER_LAST
0d2bc5
 };
0d2bc5
@@ -177,6 +194,7 @@ enum mptcp_event_attr {
0d2bc5
 	MPTCP_ATTR_IF_IDX,	/* s32 */
0d2bc5
 	MPTCP_ATTR_RESET_REASON,/* u32 */
0d2bc5
 	MPTCP_ATTR_RESET_FLAGS, /* u32 */
0d2bc5
+	MPTCP_ATTR_SERVER_SIDE,	/* u8 */
0d2bc5
 
0d2bc5
 	__MPTCP_ATTR_AFTER_LAST
0d2bc5
 };
0d2bc5
@@ -192,4 +210,32 @@ enum mptcp_event_attr {
0d2bc5
 #define MPTCP_RST_EBADPERF	5
0d2bc5
 #define MPTCP_RST_EMIDDLEBOX	6
0d2bc5
 
0d2bc5
+struct mptcp_subflow_data {
0d2bc5
+	__u32		size_subflow_data;		/* size of this structure in userspace */
0d2bc5
+	__u32		num_subflows;			/* must be 0, set by kernel */
0d2bc5
+	__u32		size_kernel;			/* must be 0, set by kernel */
0d2bc5
+	__u32		size_user;			/* size of one element in data[] */
0d2bc5
+} __attribute__((aligned(8)));
0d2bc5
+
0d2bc5
+struct mptcp_subflow_addrs {
0d2bc5
+	union {
0d2bc5
+		__kernel_sa_family_t sa_family;
0d2bc5
+		struct sockaddr sa_local;
0d2bc5
+		struct sockaddr_in sin_local;
0d2bc5
+		struct sockaddr_in6 sin6_local;
0d2bc5
+		struct __kernel_sockaddr_storage ss_local;
0d2bc5
+	};
0d2bc5
+	union {
0d2bc5
+		struct sockaddr sa_remote;
0d2bc5
+		struct sockaddr_in sin_remote;
0d2bc5
+		struct sockaddr_in6 sin6_remote;
0d2bc5
+		struct __kernel_sockaddr_storage ss_remote;
0d2bc5
+	};
0d2bc5
+};
0d2bc5
+
0d2bc5
+/* MPTCP socket options */
0d2bc5
+#define MPTCP_INFO		1
0d2bc5
+#define MPTCP_TCPINFO		2
0d2bc5
+#define MPTCP_SUBFLOW_ADDRS	3
0d2bc5
+
0d2bc5
 #endif /* _UAPI_MPTCP_H */