diff --git a/net-mgmt/fastnetmon/Makefile b/net-mgmt/fastnetmon/Makefile index 27d1c5b5066a..bb016162a849 100644 --- a/net-mgmt/fastnetmon/Makefile +++ b/net-mgmt/fastnetmon/Makefile @@ -1,63 +1,62 @@ PORTNAME= fastnetmon DISTVERSIONPREFIX= v -DISTVERSION= 1.2.8 -PORTREVISION= 11 +DISTVERSION= 1.2.9 CATEGORIES= net-mgmt security MAINTAINER= farrokhi@FreeBSD.org COMMENT= Very fast DDoS analyzer with sflow/netflow/mirror support WWW= https://fastnetmon.com LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/../LICENSE BROKEN_armv6= does not build: invokes x86 assembler BROKEN_armv7= does not build: invokes x86 assembler LIB_DEPENDS= libboost_regex.so:devel/boost-libs \ liblog4cpp.so:devel/log4cpp \ libmongoc-1.0.so:devel/mongo-c-driver \ libbson-1.0.so:devel/libbson \ libcapnp.so:devel/capnproto \ libgrpc.so:devel/grpc \ libprotobuf.so:devel/protobuf \ libabsl_base.so:devel/abseil \ libhiredis.so:databases/hiredis USES= cmake compiler:c++20-lang localbase:ldflags pkgconfig ssl USE_GITHUB= yes GH_ACCOUNT= pavel-odintsov WRKSRC_SUBDIR= src USE_RC_SUBR= ${PORTNAME} USERS= ${PORTNAME} GROUPS= ${PORTNAME} PORTDOCS= * CFLAGS_i386= -march=i586 CXXFLAGS+= -D_GNU_SOURCE CMAKE_OFF= SET_ABSOLUTE_INSTALL_PATH CMAKE_ON= ENABLE_NETMAP_SUPPORT \ LINK_WITH_ABSL OPTIONS_DEFINE= DOCS post-patch: @${REINPLACE_CMD} -e 's|/etc/networks|${PREFIX}/etc/networks|g' \ -e 's|/var/run|/var/run/${PORTNAME}|g' ${WRKSRC}/fastnetmon.conf @${REINPLACE_CMD} -e 's|/etc/|${PREFIX}/etc/|g' ${WRKSRC}/man/fastnetmon.8 post-install: ${INSTALL_DATA} ${WRKSRC}/fastnetmon.conf ${STAGEDIR}${PREFIX}/etc/fastnetmon.conf.sample ${INSTALL_DATA} ${WRKSRC}/networks_list ${STAGEDIR}${PREFIX}/etc/networks_list.sample ${INSTALL_DATA} ${WRKSRC}/networks_whitelist ${STAGEDIR}${PREFIX}/etc/networks_whitelist.sample ${MKDIR} ${STAGEDIR}/var/run/fastnetmon ${STAGEDIR}/var/log/fastnetmon ${STAGEDIR}/var/log/fastnetmon_attacks ${INSTALL_SCRIPT} ${WRKSRC}/notify_about_attack.sh ${STAGEDIR}${PREFIX}/bin/notify_about_attack.sh.sample post-install-DOCS-on: cd ${WRKSRC}/../ && ${COPYTREE_SHARE} "README.md docs" ${STAGEDIR}${DOCSDIR} .include diff --git a/net-mgmt/fastnetmon/distinfo b/net-mgmt/fastnetmon/distinfo index 6556e4a5deab..7b2592c41c89 100644 --- a/net-mgmt/fastnetmon/distinfo +++ b/net-mgmt/fastnetmon/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1740071207 -SHA256 (pavel-odintsov-fastnetmon-v1.2.8_GH0.tar.gz) = d16901b00963f395241c818d02ad2751f14e33fd32ed3cb3011641ab680e0d01 -SIZE (pavel-odintsov-fastnetmon-v1.2.8_GH0.tar.gz) = 1476794 +TIMESTAMP = 1780253659 +SHA256 (pavel-odintsov-fastnetmon-v1.2.9_GH0.tar.gz) = 5ecc10791af04fc1fd720a9a113060668426aa798d5b6c3921364213a31a5e9b +SIZE (pavel-odintsov-fastnetmon-v1.2.9_GH0.tar.gz) = 1529949 diff --git a/net-mgmt/fastnetmon/files/patch-dynamic__binary__buffer.hpp b/net-mgmt/fastnetmon/files/patch-dynamic__binary__buffer.hpp deleted file mode 100644 index 2253d27f342d..000000000000 --- a/net-mgmt/fastnetmon/files/patch-dynamic__binary__buffer.hpp +++ /dev/null @@ -1,59 +0,0 @@ ---- dynamic_binary_buffer.hpp.orig 2024-12-14 12:46:40 UTC -+++ dynamic_binary_buffer.hpp -@@ -8,9 +8,21 @@ class dynamic_binary_buffer_t { - // std::cout << "Default constructor called" << std::endl; - } - -- // Explicitly removed it as we need to implement it properly when needed -- dynamic_binary_buffer_t(dynamic_binary_buffer_t&& that) = delete; -+ dynamic_binary_buffer_t(dynamic_binary_buffer_t&& source) noexcept { -+ // Just copy all field values from source and zeroify it -+ this->internal_data_shift = source.internal_data_shift; -+ source.internal_data_shift = 0; - -+ this->byte_storage = source.byte_storage; -+ source.byte_storage = nullptr; -+ -+ this->maximum_internal_storage_size = source.maximum_internal_storage_size; -+ source.maximum_internal_storage_size = 0; -+ -+ this->errors_occured = source.errors_occured; -+ source.errors_occured = false; -+ } -+ - // We should set maximum buffer size here. - // TODO: add ability to relocate memory of we need more memory - bool set_maximum_buffer_size_in_bytes(ssize_t size) { -@@ -155,21 +167,21 @@ class dynamic_binary_buffer_t { - } - - // Return full size (with non initialized data region too) -- uint32_t get_full_size() { -+ uint32_t get_full_size() const { - return maximum_internal_storage_size; - } - - // Return only used memory region -- size_t get_used_size() { -+ size_t get_used_size() const { - return internal_data_shift; - } - -- const uint8_t* get_pointer() { -+ const uint8_t* get_pointer() const { - return byte_storage; - } - - // If we have any issues with it -- bool is_failed() { -+ bool is_failed() const { - return errors_occured; - } - -@@ -180,3 +192,6 @@ class dynamic_binary_buffer_t { - // If any errors occurred in any time when we used this buffer - bool errors_occured = false; - }; -+ -+static_assert(std::is_move_constructible_v); -+static_assert(std::is_nothrow_move_constructible_v); diff --git a/net-mgmt/fastnetmon/files/patch-fast__library.cpp b/net-mgmt/fastnetmon/files/patch-fast__library.cpp deleted file mode 100644 index 99192022b423..000000000000 --- a/net-mgmt/fastnetmon/files/patch-fast__library.cpp +++ /dev/null @@ -1,55 +0,0 @@ ---- fast_library.cpp.orig 2024-12-14 12:46:40 UTC -+++ fast_library.cpp -@@ -1094,15 +1094,13 @@ std::string dns_lookup(std::string domain_name) { - - std::string dns_lookup(std::string domain_name) { - try { -- boost::asio::io_service io_service; -- boost::asio::ip::tcp::resolver resolver(io_service); -+ boost::asio::io_context io_context; -+ boost::asio::ip::tcp::resolver resolver(io_context); - -- boost::asio::ip::tcp::resolver::query query(domain_name, ""); -+ auto results = resolver.resolve(domain_name, ""); - -- for (boost::asio::ip::tcp::resolver::iterator i = resolver.resolve(query); -- i != boost::asio::ip::tcp::resolver::iterator(); ++i) { -- boost::asio::ip::tcp::endpoint end = *i; -- return end.address().to_string(); -+ for (const auto& entry : results) { -+ return entry.endpoint().address().to_string(); - } - } catch (std::exception& e) { - return ""; -@@ -1428,7 +1426,7 @@ bool validate_ipv6_or_ipv4_host(const std::string host - boost::system::error_code ec; - - // Try to build it from string representation -- boost::asio::ip::address::from_string(host, ec); -+ boost::asio::ip::make_address(host, ec); - - // If we failed to parse it - if (ec) { -@@ -1535,7 +1533,7 @@ bool execute_web_request_secure(std::string address, - return false; - } - -- auto end_point = resolver.resolve(boost::asio::ip::tcp::resolver::query{ host, port }, ec); -+ auto end_point = resolver.resolve(host, port, ec); - - if (ec) { - logger << log4cpp::Priority::ERROR << "Could not resolve peer address in execute_web_request " << ec; -@@ -1699,11 +1697,11 @@ bool execute_web_request(std::string address, - - // Normal boost::asio setup - // std::string const host = "178.62.227.110"; -- boost::asio::io_service ios; -+ boost::asio::io_context ios; - boost::asio::ip::tcp::resolver r(ios); - boost::asio::ip::tcp::socket sock(ios); - -- auto end_point = r.resolve(boost::asio::ip::tcp::resolver::query{ host, port }, ec); -+ auto end_point = r.resolve(host, port, ec); - - if (ec) { - error_text = "Could not resolve peer address in execute_web_request " + ec.message();