net-mgmt/fastnetmon: Update to 1.2.5

This commit is contained in:
Babak Farrokhi 2023-06-19 16:11:44 +02:00
parent c748b7ef83
commit d79923ed55
7 changed files with 9 additions and 80 deletions

View file

@ -1,7 +1,6 @@
PORTNAME= fastnetmon
PORTVERSION= 1.2.4
PORTVERSION= 1.2.5
DISTVERSIONPREFIX= v
PORTREVISION= 3
CATEGORIES= net-mgmt security
MAINTAINER= farrokhi@FreeBSD.org
@ -58,7 +57,7 @@ post-patch:
s|"/etc/|"${PREFIX}/etc/|g; s|/root/fastnetmon|${DATADIR}|g' \
${WRKSRC}/src/fastnetmon.conf ${WRKSRC}/src/fastnetmon.cpp
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
${WRKSRC}/src/man/fastnetmon.8 ${WRKSRC}/src/fast_platform.h.template
${WRKSRC}/src/man/fastnetmon.8
post-install:
${MV} ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf \

View file

@ -1,3 +1,3 @@
TIMESTAMP = 1677848493
SHA256 (pavel-odintsov-fastnetmon-v1.2.4_GH0.tar.gz) = 84cd5db0e270f6c268923592eabd5cb0d1689293d9d9f6f0634af548b29f9bb4
SIZE (pavel-odintsov-fastnetmon-v1.2.4_GH0.tar.gz) = 1056097
TIMESTAMP = 1686746794
SHA256 (pavel-odintsov-fastnetmon-v1.2.5_GH0.tar.gz) = d92a1f16e60b6ab6f5c5e023a215570e9352ce9d0c9a9d7209416f8cd0227ae6
SIZE (pavel-odintsov-fastnetmon-v1.2.5_GH0.tar.gz) = 1383370

View file

@ -1,10 +0,0 @@
--- src/fast_endianless.hpp.orig 2023-03-04 15:33:46 UTC
+++ src/fast_endianless.hpp
@@ -12,6 +12,7 @@
// For be64toh and htobe64
#if defined(__FreeBSD__) || defined(__DragonFly__)
#include <sys/endian.h>
+#include <cstdint>
#endif
// Linux standard functions for endian conversions are ugly because there are no checks about arguments length

View file

@ -1,15 +0,0 @@
--- src/fast_library.cpp.orig 2023-03-05 11:34:07 UTC
+++ src/fast_library.cpp
@@ -1249,7 +1249,11 @@ bool get_interface_number_by_device_name(int socket_fd
return false;
}
- interface_number = ifr.ifr_ifindex;
+ #ifdef __FreeBSD__
+ interface_number = ifr.ifr_ifru.ifru_index;
+ #else
+ interface_number = ifr.ifr_ifindex;
+ #endif
#else
/* Fallback to if_nametoindex(3) otherwise. */
interface_number = if_nametoindex(interface_name.c_str());

View file

@ -1,26 +0,0 @@
--- src/fast_platform.h.template.orig 2023-03-01 14:23:34 UTC
+++ src/fast_platform.h.template
@@ -9,19 +9,19 @@ class FastnetmonPlatformConfigurtion {
std::string fastnetmon_version = "${FASTNETMON_APPLICATION_VERSION}";
std::string pid_path = "/var/run/fastnetmon.pid";
- std::string global_config_path = "/etc/fastnetmon.conf";
+ std::string global_config_path = "%%PREFIX%%/etc/fastnetmon.conf";
std::string log_file_path = "/var/log/fastnetmon.log";
std::string attack_details_folder = "/var/log/fastnetmon_attacks";
// Default path to notify script
- std::string notify_script_path = "/usr/local/bin/notify_about_attack.sh";
+ std::string notify_script_path = "%%PREFIX%%/bin/notify_about_attack.sh";
// Default path to file with networks for whitelising
- std::string white_list_path = "/etc/networks_whitelist";
+ std::string white_list_path = "%%PREFIX%%/etc/networks_whitelist";
// Default path to file with all networks listing
- std::string networks_list_path = "/etc/networks_list";
+ std::string networks_list_path = "%%PREFIX%%/etc/networks_list";
/* Platform specific paths end */
};

View file

@ -1,17 +1,6 @@
--- src/fastnetmon.cpp.orig 2023-03-01 14:23:34 UTC
--- src/fastnetmon.cpp.orig 2023-05-23 06:20:59 UTC
+++ src/fastnetmon.cpp
@@ -12,8 +12,8 @@
#include <unistd.h>
#include <arpa/inet.h>
-#include <net/if_arp.h> // struct arphdr
-#include <netinet/if_ether.h>
+//#include <net/if_arp.h> // struct arphdr
+//#include <netinet/if_ether.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/ip_icmp.h>
@@ -161,7 +161,7 @@ unsigned int stats_thread_initial_call_delay = 30;
@@ -156,7 +156,7 @@ unsigned int stats_thread_initial_call_delay = 30;
std::string reporting_server = "community-stats.fastnetmon.com";
// Path to temporarily store backtrace when fatal failure happened
@ -20,7 +9,7 @@
// Each this seconds we will check about available data in bucket
unsigned int check_for_availible_for_processing_packets_buckets = 1;
@@ -435,7 +435,7 @@ std::string exabgp_community_subnet = "";
@@ -430,7 +430,7 @@ std::string exabgp_community_subnet = "";
std::string exabgp_community_host = "";
@ -29,7 +18,7 @@
std::string exabgp_next_hop = "";
// Graphite monitoring
@@ -519,7 +519,7 @@ void sigpipe_handler_for_popen(int signo) {
@@ -514,7 +514,7 @@ void sigpipe_handler_for_popen(int signo) {
#ifdef GEOIP
bool geoip_init() {
// load GeoIP ASN database to memory

View file

@ -1,8 +0,0 @@
--- src/notify_about_attack.sh.orig 2023-03-06 10:33:26 UTC
+++ src/notify_about_attack.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/sh
#
# Hello, lovely FastNetMon customer. I'm really happy to see you here