From 0d2bc5f8413a5c4311257db08720f3225b18339b Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Sep 27 2022 11:07:14 +0000 Subject: import mptcpd-0.8-3.el9 --- diff --git a/SOURCES/workaround-build-issues-uapi.patch b/SOURCES/workaround-build-issues-uapi.patch new file mode 100644 index 0000000..0b391c1 --- /dev/null +++ b/SOURCES/workaround-build-issues-uapi.patch @@ -0,0 +1,102 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -207,8 +207,7 @@ AC_CHECK_HEADERS([linux/mptcp.h], + AX_CHECK_DEFINE( + [linux/mptcp.h], + [MPTCP_PM_NAME], +- [AC_DEFINE([HAVE_LINUX_MPTCP_H_UPSTREAM], [1]) +- AX_CHECK_DEFINE([linux/mptcp.h], ++ [AX_CHECK_DEFINE([linux/mptcp.h], + [MPTCP_PM_EV_GRP_NAME], + [AC_DEFINE([HAVE_LINUX_MPTCP_H_UPSTREAM_EVENTS], + [1]) +--- a/include/linux/mptcp_upstream.h ++++ b/include/linux/mptcp_upstream.h +@@ -2,8 +2,16 @@ + #ifndef _UAPI_MPTCP_H + #define _UAPI_MPTCP_H + ++#ifndef __KERNEL__ ++#include /* for sockaddr_in and sockaddr_in6 */ ++#include /* for struct sockaddr */ ++#endif ++ + #include + #include ++#include /* for sockaddr_in */ ++#include /* for sockaddr_in6 */ ++#include /* for sockaddr_storage and sa_family */ + + #define MPTCP_SUBFLOW_FLAG_MCAP_REM _BITUL(0) + #define MPTCP_SUBFLOW_FLAG_MCAP_LOC _BITUL(1) +@@ -48,6 +56,9 @@ enum { + MPTCP_PM_ATTR_ADDR, /* nested address */ + MPTCP_PM_ATTR_RCV_ADD_ADDRS, /* u32 */ + MPTCP_PM_ATTR_SUBFLOWS, /* u32 */ ++ MPTCP_PM_ATTR_TOKEN, /* u32 */ ++ MPTCP_PM_ATTR_LOC_ID, /* u8 */ ++ MPTCP_PM_ATTR_ADDR_REMOTE, /* nested address */ + + __MPTCP_PM_ATTR_MAX + }; +@@ -73,6 +84,8 @@ enum { + #define MPTCP_PM_ADDR_FLAG_SIGNAL (1 << 0) + #define MPTCP_PM_ADDR_FLAG_SUBFLOW (1 << 1) + #define MPTCP_PM_ADDR_FLAG_BACKUP (1 << 2) ++#define MPTCP_PM_ADDR_FLAG_FULLMESH (1 << 3) ++#define MPTCP_PM_ADDR_FLAG_IMPLICIT (1 << 4) + + enum { + MPTCP_PM_CMD_UNSPEC, +@@ -84,6 +97,10 @@ enum { + MPTCP_PM_CMD_SET_LIMITS, + MPTCP_PM_CMD_GET_LIMITS, + MPTCP_PM_CMD_SET_FLAGS, ++ MPTCP_PM_CMD_ANNOUNCE, ++ MPTCP_PM_CMD_REMOVE, ++ MPTCP_PM_CMD_SUBFLOW_CREATE, ++ MPTCP_PM_CMD_SUBFLOW_DESTROY, + + __MPTCP_PM_CMD_AFTER_LAST + }; +@@ -177,6 +194,7 @@ enum mptcp_event_attr { + MPTCP_ATTR_IF_IDX, /* s32 */ + MPTCP_ATTR_RESET_REASON,/* u32 */ + MPTCP_ATTR_RESET_FLAGS, /* u32 */ ++ MPTCP_ATTR_SERVER_SIDE, /* u8 */ + + __MPTCP_ATTR_AFTER_LAST + }; +@@ -192,4 +210,32 @@ enum mptcp_event_attr { + #define MPTCP_RST_EBADPERF 5 + #define MPTCP_RST_EMIDDLEBOX 6 + ++struct mptcp_subflow_data { ++ __u32 size_subflow_data; /* size of this structure in userspace */ ++ __u32 num_subflows; /* must be 0, set by kernel */ ++ __u32 size_kernel; /* must be 0, set by kernel */ ++ __u32 size_user; /* size of one element in data[] */ ++} __attribute__((aligned(8))); ++ ++struct mptcp_subflow_addrs { ++ union { ++ __kernel_sa_family_t sa_family; ++ struct sockaddr sa_local; ++ struct sockaddr_in sin_local; ++ struct sockaddr_in6 sin6_local; ++ struct __kernel_sockaddr_storage ss_local; ++ }; ++ union { ++ struct sockaddr sa_remote; ++ struct sockaddr_in sin_remote; ++ struct sockaddr_in6 sin6_remote; ++ struct __kernel_sockaddr_storage ss_remote; ++ }; ++}; ++ ++/* MPTCP socket options */ ++#define MPTCP_INFO 1 ++#define MPTCP_TCPINFO 2 ++#define MPTCP_SUBFLOW_ADDRS 3 ++ + #endif /* _UAPI_MPTCP_H */ diff --git a/SPECS/mptcpd.spec b/SPECS/mptcpd.spec index c44fe03..137ee70 100644 --- a/SPECS/mptcpd.spec +++ b/SPECS/mptcpd.spec @@ -1,7 +1,7 @@ Summary: Multipath TCP daemon Name: mptcpd Version: 0.8 -Release: 2%{?dist} +Release: 3%{?dist} License: BSD URL: https://multipath-tcp.org Requires(post): systemd @@ -19,6 +19,7 @@ BuildRequires: systemd-rpm-macros Source0: https://github.com/intel/mptcpd/archive/v%{version}/%{name}-%{version}.tar.gz +Patch2: workaround-build-issues-uapi.patch Patch3: 0003-fix-multilib-install.patch Patch4: 0001-mptcpize-force-MPTCP-usage-for-IPPROTO_IP-too-159.patch Patch5: 0001-mptcpize-use-explicit-file-copy-instead-of-rename-16.patch @@ -88,6 +89,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %{_libdir}/pkgconfig/mptcpd.pc %changelog +* Wed Jul 6 2022 Davide Caratti - 0.8-3 +- workaround for uAPI header build issue + * Tue Nov 30 2021 Davide Caratti - 0.8-2 - fix mptcpize to work also when protocol number is 0 (upstream issue #159) and when command resides in another file system (upstream issue #161)