diff options
author | Craig Andrews <candrews@gentoo.org> | 2022-06-27 10:35:21 -0400 |
---|---|---|
committer | Craig Andrews <candrews@gentoo.org> | 2022-06-27 10:35:21 -0400 |
commit | 82cc358834c8998b5ce250fa0b45d91ff3e8b64c (patch) | |
tree | a7541b6d64804b44db5675b329614308fb59d8ec /net-misc/mptcpd | |
parent | net-misc/mptcpd: delete .la libtool archives (diff) | |
download | gentoo-82cc358834c8998b5ce250fa0b45d91ff3e8b64c.tar.gz gentoo-82cc358834c8998b5ce250fa0b45d91ff3e8b64c.tar.bz2 gentoo-82cc358834c8998b5ce250fa0b45d91ff3e8b64c.zip |
net-misc/mptcpd: Cleanup old versions
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Craig Andrews <candrews@gentoo.org>
Diffstat (limited to 'net-misc/mptcpd')
-rw-r--r-- | net-misc/mptcpd/Manifest | 1 | ||||
-rw-r--r-- | net-misc/mptcpd/files/mptcpd-0.9-loopback-monitoring.patch | 197 | ||||
-rw-r--r-- | net-misc/mptcpd/mptcpd-0.10.ebuild | 65 | ||||
-rw-r--r-- | net-misc/mptcpd/mptcpd-0.9.ebuild | 72 |
4 files changed, 0 insertions, 335 deletions
diff --git a/net-misc/mptcpd/Manifest b/net-misc/mptcpd/Manifest index c4bbaec5f13e..3e5be0c6a1a5 100644 --- a/net-misc/mptcpd/Manifest +++ b/net-misc/mptcpd/Manifest @@ -1,2 +1 @@ DIST mptcpd-0.10.tar.gz 671508 BLAKE2B de29050b5394b4011bf2bc25ce7ca33c42da8332e10d89c849047508886080e43e0e4f734e77437f8b0122336b47aa4f6442c07461e4552183cf10b08dfb6d81 SHA512 758dd9c84446abab7a26e6e7fa19fedb6ab4a8dbb8d6e2535f3eae5b9b423becaec9a18aea214498b424d110227af7eafb630b91b963eb5be2da0da936fd3a93 -DIST mptcpd-0.9.tar.gz 654063 BLAKE2B fd9e8bf5cec517c934b9d38a736a128d087b54b5e4db90816a8cf8c242195fec8e3c4cd28d2f6e5a93326cac311a6b29048313c722004cea39e19448dc467976 SHA512 4fd292304d6270351b865e86cc401c1f5cc9043606b171e852bd37b2472c5f80061d760be68e5cd965caccb2f25c03d9ceea6232a5a587016c81f85e68ca8882 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/mptcpd-0.10.ebuild b/net-misc/mptcpd/mptcpd-0.10.ebuild deleted file mode 100644 index 756cb805d063..000000000000 --- a/net-misc/mptcpd/mptcpd-0.10.ebuild +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit autotools linux-info systemd - -DESCRIPTION="Daemon that performs multipath TCP path management related operations." -HOMEPAGE="https://github.com/intel/mptcpd/" - -LICENSE="GPL-2" -SLOT="0/${PV}" -IUSE="debug doc" - -RDEPEND=" - >=dev-libs/ell-0.45.0 - elibc_musl? ( sys-libs/argp-standalone ) - " -DEPEND=" - ${RDEPEND} - >=sys-kernel/linux-headers-5.6 - " -BDEPEND=" - doc? ( - app-doc/doxygen - app-text/pandoc - ) - virtual/pkgconfig - " - -if [[ ${PV} == 9999* ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/intel/mptcpd.git" -else - SRC_URI="https://github.com/intel/mptcpd/releases/download/v${PV}/${P}.tar.gz" - KEYWORDS="~amd64" -fi - -CONFIG_CHECK="MPTCP" - -src_prepare() { - default - - # For Werror patch - eautoreconf -} - -src_configure() { - local myeconfargs=( - --with-kernel=upstream - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" - $(use_enable debug) - ) - - econf "${myeconfargs[@]}" -} - -src_compile() { - emake - use doc && emake doxygen-doc -} - -src_test() { - emake check -} diff --git a/net-misc/mptcpd/mptcpd-0.9.ebuild b/net-misc/mptcpd/mptcpd-0.9.ebuild deleted file mode 100644 index f678fe599d7a..000000000000 --- a/net-misc/mptcpd/mptcpd-0.9.ebuild +++ /dev/null @@ -1,72 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit autotools linux-info systemd - -DESCRIPTION="Daemon that performs multipath TCP path management related operations." -HOMEPAGE="https://github.com/intel/mptcpd/" - -LICENSE="GPL-2" -SLOT="0/${PV}" -IUSE="debug doc" - -RDEPEND=" - >=dev-libs/ell-0.30.0 - elibc_musl? ( sys-libs/argp-standalone ) - " -DEPEND=" - ${RDEPEND} - >=sys-kernel/linux-headers-5.6 - " -BDEPEND=" - doc? ( - app-doc/doxygen - app-text/pandoc - ) - virtual/pkgconfig - " -PATCHES=( - "${FILESDIR}/${P}-loopback-monitoring.patch" -) - -if [[ ${PV} == 9999* ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/intel/mptcpd.git" -else - SRC_URI="https://github.com/intel/mptcpd/releases/download/v${PV}/${P}.tar.gz" - KEYWORDS="~amd64" -fi - -CONFIG_CHECK="MPTCP" - -PATCHES=( - "${FILESDIR}"/${PN}-0.9-no-werror.patch -) - -src_prepare() { - default - - # For Werror patch - eautoreconf -} - -src_configure() { - local myeconfargs=( - --with-kernel=upstream - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" - $(use_enable debug) - ) - - econf "${myeconfargs[@]}" -} - -src_compile() { - emake - use doc && emake doxygen-doc -} - -src_test() { - emake check -} |