summaryrefslogtreecommitdiff
path: root/net-misc/mptcpd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
commit0f558761aa2dee1017b4751e4017205e015a9560 (patch)
tree037df795519468a25d9362b4e95cdaeb84eb1cf9 /net-misc/mptcpd
parent752d6256e5204b958b0ef7905675a940b5e9172f (diff)
gentoo resync : 29.12.2022
Diffstat (limited to 'net-misc/mptcpd')
-rw-r--r--net-misc/mptcpd/Manifest8
-rw-r--r--net-misc/mptcpd/files/mptcpd-0.9-loopback-monitoring.patch197
-rw-r--r--net-misc/mptcpd/files/mptcpd-0.9-no-werror.patch21
-rw-r--r--net-misc/mptcpd/mptcpd-0.10-r1.ebuild (renamed from net-misc/mptcpd/mptcpd-0.9.ebuild)18
-rw-r--r--net-misc/mptcpd/mptcpd-9999.ebuild15
5 files changed, 51 insertions, 208 deletions
diff --git a/net-misc/mptcpd/Manifest b/net-misc/mptcpd/Manifest
index 616c95796f1a..1e9a7ced30be 100644
--- a/net-misc/mptcpd/Manifest
+++ b/net-misc/mptcpd/Manifest
@@ -1,5 +1,5 @@
-AUX mptcpd-0.9-loopback-monitoring.patch 6941 BLAKE2B f3798b5da940266cad94093e0ab16c93546ac62923b94f947ffdefea89b864776ef668d6359c6a7b7f5f675b05dd4d55f73ea55f632fb209eb12b99c8f585975 SHA512 cf3cc223d46ad568b25c5bb9c583ad388d558242956692328c9582d11c73e69d2acc58661607b9ec44b71abc5265f6171529d34b21cabf5f16c313bf05d2a7a6
-DIST mptcpd-0.9.tar.gz 654063 BLAKE2B fd9e8bf5cec517c934b9d38a736a128d087b54b5e4db90816a8cf8c242195fec8e3c4cd28d2f6e5a93326cac311a6b29048313c722004cea39e19448dc467976 SHA512 4fd292304d6270351b865e86cc401c1f5cc9043606b171e852bd37b2472c5f80061d760be68e5cd965caccb2f25c03d9ceea6232a5a587016c81f85e68ca8882
-EBUILD mptcpd-0.9.ebuild 1161 BLAKE2B 1cbefb7a16d7bcfb267e5c40ca708fd5908e6a9e214671419950b63f2012a80617c537a4d5eb4f4d2d4c82f5b53cfaf2d5c595f4a6aadb566fad0bb11da4c736 SHA512 d7449fcd0eb50db970a7174624250c8f4b743a967c8a9f058063a01e6915d56586991228204445f630edce0743a1879576734e782ad73d971cafd7590ff0b40a
-EBUILD mptcpd-9999.ebuild 1103 BLAKE2B 629897a77071480b8516bc646df0852838a88fe8122581ba13ff178691e3311dc9927d78502d7bb415fd506eb435887ff4b348f8a53d24b04966e9812eb381f8 SHA512 f9c005fbad040d994458e7c8cd9b64f929368de5f7d2ee7abc5f2d84deb944228d04966820c71bb01c42940001e8dc5e5110b268b9be8f9eefa9d33ed80403b0
+AUX mptcpd-0.9-no-werror.patch 810 BLAKE2B 49e0b2900529a64d9078d2838eb7039f3b733094d8f12f1cd6b36fed89f1b9d3929ae7f3b26eb2ed0a162e06b3a8248deaa4a23e6506dea3ed20a3175fc6fff9 SHA512 c3e082253960ca740d90a2e97dc5a73405ce8bb7aec7909f3a1c7deb837fe47e4b900127525f95fcd8648d4bb08c2b9ed2656b876b93d5f09ad280d31afc0fdc
+DIST mptcpd-0.10.tar.gz 671508 BLAKE2B de29050b5394b4011bf2bc25ce7ca33c42da8332e10d89c849047508886080e43e0e4f734e77437f8b0122336b47aa4f6442c07461e4552183cf10b08dfb6d81 SHA512 758dd9c84446abab7a26e6e7fa19fedb6ab4a8dbb8d6e2535f3eae5b9b423becaec9a18aea214498b424d110227af7eafb630b91b963eb5be2da0da936fd3a93
+EBUILD mptcpd-0.10-r1.ebuild 1224 BLAKE2B a81fc6341fcde5e4a2f2fd31aec4a51b7bdf7280fd5471f69acece74d21455ca21244a46a4835807399fcd7408b5d5834b39cf96e1077942ac470f83e18b6794 SHA512 bcbf211cb9d101b9a9941c39c662c6d13c3ef58ac08fd664a0b789b6229fea9eaa0ea755ef0e85747c156e32b8097a40363087b4310a70246299521f07a80114
+EBUILD mptcpd-9999.ebuild 1224 BLAKE2B a81fc6341fcde5e4a2f2fd31aec4a51b7bdf7280fd5471f69acece74d21455ca21244a46a4835807399fcd7408b5d5834b39cf96e1077942ac470f83e18b6794 SHA512 bcbf211cb9d101b9a9941c39c662c6d13c3ef58ac08fd664a0b789b6229fea9eaa0ea755ef0e85747c156e32b8097a40363087b4310a70246299521f07a80114
MISC metadata.xml 326 BLAKE2B 77d6f17ab473dfbdd5d156b8c6020ba80cf49d95fc9693c88b6f6a5f2a9449cc0caa53ba000183a4fba747d7e298b77528346c680049ea28fa86b9c308da0a34 SHA512 1150bc86b2b12c042e0de7eab7701808a703bd0a42e5a38eac94e07131f3138ee6c010644fd1837ef6240e1c83cf51553f8f99fd03970a2f84252aeee7e76f06
diff --git a/net-misc/mptcpd/files/mptcpd-0.9-loopback-monitoring.patch b/net-misc/mptcpd/files/mptcpd-0.9-loopback-monitoring.patch
deleted file mode 100644
index 38061a754a4d..000000000000
--- a/net-misc/mptcpd/files/mptcpd-0.9-loopback-monitoring.patch
+++ /dev/null
@@ -1,197 +0,0 @@
-From a200ef26e4daf0347dd8f1bd35d49dd66fba7a7e Mon Sep 17 00:00:00 2001
-From: Ossama Othman <ossama.othman@intel.com>
-Date: Thu, 17 Feb 2022 16:39:59 -0800
-Subject: [PATCH] Allow loopback network interface monitoring. (#220)
-
-* network_monitor: Allow loopback monitoring.
-
-Add a new mptcpd_nm_monitor_loopback() function that allows the user
-to enable monitoring of loopback network interfaces. Monitoring of
-loopback network interfaces is meant primarily for testing purposes.
-Mptcpd will retain the previous behavior of only monitoring
-non-loopback network interfaces by default.
-
-* tests: Enable loopback interface monitoring.
-
-Enable loopback network interface monitoring to allow the
-test-network-monitor unit test to succeed in cases where non-loopback
-interfaces are unavailable, such as in a sandboxed environment.
-
-Fixes #208.
-
-Co-authored-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
----
- include/mptcpd/network_monitor.h | 21 ++++++++++++++++++
- lib/network_monitor.c | 38 +++++++++++++++++++++-----------
- tests/test-network-monitor.c | 15 +++++++++----
- 3 files changed, 57 insertions(+), 17 deletions(-)
-
-diff --git a/include/mptcpd/network_monitor.h b/include/mptcpd/network_monitor.h
-index dc35e3d..ea1a95b 100644
---- a/include/mptcpd/network_monitor.h
-+++ b/include/mptcpd/network_monitor.h
-@@ -213,6 +213,27 @@ MPTCPD_API bool mptcpd_nm_register_ops(struct mptcpd_nm *nm,
- struct mptcpd_nm_ops const *ops,
- void *user_data);
-
-+/**
-+ * @brief Enable monitoring of the loopback network interface.
-+ *
-+ * Mptcpd normally only monitors non-loopback network interfaces.
-+ * Call this function to enable monitoring of loopback network
-+ * interfaces.
-+ *
-+ * @note Mptcpd monitoring of loopback network interfaces is meant
-+ * primarily for testing purposes.
-+ *
-+ * @param[in,out] nm Pointer to the mptcpd network monitor
-+ * object.
-+ * @param[in] enable Enable or disable monitoring of loopback
-+ * network interfaces.
-+ *
-+ * @retval true Successfully enable or disabled.
-+ * @retval false Invalid @a nm argument.
-+ */
-+MPTCPD_API bool mptcpd_nm_monitor_loopback(struct mptcpd_nm *nm,
-+ bool enable);
-+
- #ifdef __cplusplus
- }
- #endif
-diff --git a/lib/network_monitor.c b/lib/network_monitor.c
-index 2ae275b..7a3927e 100644
---- a/lib/network_monitor.c
-+++ b/lib/network_monitor.c
-@@ -4,7 +4,7 @@
- *
- * @brief mptcpd network device monitoring.
- *
-- * Copyright (c) 2017-2021, Intel Corporation
-+ * Copyright (c) 2017-2022, Intel Corporation
- */
-
- #ifdef HAVE_CONFIG_H
-@@ -78,6 +78,9 @@ struct mptcpd_nm
-
- /// Flags controlling address notification.
- uint32_t notify_flags;
-+
-+ /// Enable/disable loopback network interface monitoring.
-+ bool monitor_loopback;
- };
-
- // -------------------------------------------------------------------
-@@ -525,16 +528,15 @@ static void mptcpd_interface_callback(void *data, void *user_data)
- *
- * @return @c true if network interface is ready, and @c false other.
- */
--static bool is_interface_ready(struct ifinfomsg const *ifi)
-+static bool is_interface_ready(struct mptcpd_nm const *nm,
-+ struct ifinfomsg const *ifi)
- {
-- /*
-- Only accept non-loopback network interfaces that are
-- up and running.
-- */
-- static unsigned int const iff_ready = IFF_UP | IFF_RUNNING;
-+ // Only accept network interfaces that are up and running.
-+ static unsigned int iff_ready = IFF_UP | IFF_RUNNING;
-
- return (ifi->ifi_flags & iff_ready) == iff_ready
-- && (ifi->ifi_flags & IFF_LOOPBACK) == 0;
-+ && ((ifi->ifi_flags & IFF_LOOPBACK) == 0
-+ || nm->monitor_loopback);
- }
-
- /**
-@@ -708,7 +710,7 @@ static void handle_link(uint16_t type,
-
- switch (type) {
- case RTM_NEWLINK:
-- if (is_interface_ready(ifi))
-+ if (is_interface_ready(nm, ifi))
- update_link(ifi, len, nm);
- else
- remove_link(ifi, nm); // Interface disabled.
-@@ -1301,7 +1303,7 @@ static void handle_rtm_getlink(int error,
- struct ifinfomsg const *const ifi = data;
- struct mptcpd_nm *const nm = user_data;
-
-- if (is_interface_ready(ifi)) {
-+ if (is_interface_ready(nm, ifi)) {
- (void) insert_link(ifi, len, nm);
- }
- }
-@@ -1442,9 +1444,10 @@ struct mptcpd_nm *mptcpd_nm_create(uint32_t flags)
- return NULL;
- }
-
-- nm->notify_flags = flags;
-- nm->interfaces = l_queue_new();
-- nm->ops = l_queue_new();
-+ nm->notify_flags = flags;
-+ nm->interfaces = l_queue_new();
-+ nm->ops = l_queue_new();
-+ nm->monitor_loopback = false;
-
- /**
- * Get network interface information.
-@@ -1555,6 +1558,15 @@ bool mptcpd_nm_register_ops(struct mptcpd_nm *nm,
- return registered;
- }
-
-+bool mptcpd_nm_monitor_loopback(struct mptcpd_nm *nm, bool enable)
-+{
-+ if (nm == NULL)
-+ return false;
-+
-+ nm->monitor_loopback = enable;
-+
-+ return true;
-+}
-
- /*
- Local Variables:
-diff --git a/tests/test-network-monitor.c b/tests/test-network-monitor.c
-index d7c6b87..d22f6be 100644
---- a/tests/test-network-monitor.c
-+++ b/tests/test-network-monitor.c
-@@ -4,7 +4,7 @@
- *
- * @brief mptcpd network monitor test.
- *
-- * Copyright (c) 2018-2020, Intel Corporation
-+ * Copyright (c) 2018-2020, 2022, Intel Corporation
- */
-
- #define _DEFAULT_SOURCE // Enable IFF_... interface flags in <net/if.h>.
-@@ -115,12 +115,11 @@ static void check_interface(struct mptcpd_interface const *i, void *data)
- l_queue_foreach(i->addrs, dump_addr, NULL);
-
- /*
-- Only non-loopback interfaces that are up and running should
-- be monitored.
-+ Only network interfaces that are up and running should be
-+ monitored.
- */
- static unsigned int const ready = IFF_UP | IFF_RUNNING;
- assert(ready == (i->flags & ready));
-- assert(!(i->flags & IFF_LOOPBACK));
-
- if (data) {
- struct foreach_data *const fdata = data;
-@@ -249,6 +248,14 @@ int main(void)
- struct mptcpd_nm *const nm = mptcpd_nm_create(0);
- assert(nm);
-
-+ assert(!mptcpd_nm_monitor_loopback(NULL, true)); // Bad arg
-+
-+ /*
-+ Enable loopback network interface monitoring for this unit
-+ test in case non-loopback network interfaces are unavailable.
-+ */
-+ assert(mptcpd_nm_monitor_loopback(nm, true));
-+
- struct mptcpd_nm_ops const nm_events[] = {
- {
- .new_interface = handle_new_interface,
diff --git a/net-misc/mptcpd/files/mptcpd-0.9-no-werror.patch b/net-misc/mptcpd/files/mptcpd-0.9-no-werror.patch
new file mode 100644
index 000000000000..7e3357c8e361
--- /dev/null
+++ b/net-misc/mptcpd/files/mptcpd-0.9-no-werror.patch
@@ -0,0 +1,21 @@
+https://bugs.gentoo.org/832563
+--- a/configure.ac
++++ b/configure.ac
+@@ -31,7 +31,7 @@ dnl Support "--enable-debug=..." configure script command line option.
+ AX_IS_RELEASE([git-directory])
+ AX_CHECK_ENABLE_DEBUG([yes])
+
+-AM_INIT_AUTOMAKE([1.15 -Wall -Werror -Wno-portability silent-rules std-options check-news])
++AM_INIT_AUTOMAKE([1.15 -Wall -Wno-portability silent-rules std-options check-news])
+ AM_SILENT_RULES([yes])
+ LT_INIT([disable-static])
+
+@@ -301,7 +301,7 @@ LIBS=$mptcpd_save_libs
+ # warning free.
+ # ---------------------------------------------------------------
+ AX_CFLAGS_WARN_ALL([CFLAGS])
+-AX_APPEND_COMPILE_FLAGS([-Wextra -Werror -pedantic])
++AX_APPEND_COMPILE_FLAGS([-Wextra -pedantic])
+
+ # ---------------------------------------------------------------
+ # Enable compile-time defense
diff --git a/net-misc/mptcpd/mptcpd-0.9.ebuild b/net-misc/mptcpd/mptcpd-0.10-r1.ebuild
index a35610eb41ad..2ee9b4505be0 100644
--- a/net-misc/mptcpd/mptcpd-0.9.ebuild
+++ b/net-misc/mptcpd/mptcpd-0.10-r1.ebuild
@@ -13,7 +13,7 @@ SLOT="0/${PV}"
IUSE="debug doc"
RDEPEND="
- >=dev-libs/ell-0.30.0
+ >=dev-libs/ell-0.45.0
elibc_musl? ( sys-libs/argp-standalone )
"
DEPEND="
@@ -27,9 +27,6 @@ BDEPEND="
)
virtual/pkgconfig
"
-PATCHES=(
- "${FILESDIR}/${P}-loopback-monitoring.patch"
-)
if [[ ${PV} == 9999* ]]; then
inherit git-r3
@@ -41,9 +38,15 @@ fi
CONFIG_CHECK="MPTCP"
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.9-no-werror.patch
+)
+
src_prepare() {
default
- [[ ${PV} == 9999* ]] && eautoreconf
+
+ # For Werror patch
+ eautoreconf
}
src_configure() {
@@ -64,3 +67,8 @@ src_compile() {
src_test() {
emake check
}
+
+src_install() {
+ default
+ find "${ED}" -name '*.la' -delete || die
+}
diff --git a/net-misc/mptcpd/mptcpd-9999.ebuild b/net-misc/mptcpd/mptcpd-9999.ebuild
index 8f307676ab46..2ee9b4505be0 100644
--- a/net-misc/mptcpd/mptcpd-9999.ebuild
+++ b/net-misc/mptcpd/mptcpd-9999.ebuild
@@ -13,7 +13,7 @@ SLOT="0/${PV}"
IUSE="debug doc"
RDEPEND="
- >=dev-libs/ell-0.30.0
+ >=dev-libs/ell-0.45.0
elibc_musl? ( sys-libs/argp-standalone )
"
DEPEND="
@@ -38,9 +38,15 @@ fi
CONFIG_CHECK="MPTCP"
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.9-no-werror.patch
+)
+
src_prepare() {
default
- [[ ${PV} == 9999* ]] && eautoreconf
+
+ # For Werror patch
+ eautoreconf
}
src_configure() {
@@ -61,3 +67,8 @@ src_compile() {
src_test() {
emake check
}
+
+src_install() {
+ default
+ find "${ED}" -name '*.la' -delete || die
+}