update to fastnetmon-1.1.7
This commit is contained in:
parent
34a135b89a
commit
68e15d0112
@ -1,11 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.12 2020/07/20 05:53:41 jasper Exp $
|
||||
# $OpenBSD: Makefile,v 1.13 2020/09/13 07:59:58 jasper Exp $
|
||||
|
||||
COMMENT = DDoS detector with multiple packet capture engines
|
||||
|
||||
GH_ACCOUNT = pavel-odintsov
|
||||
GH_PROJECT = fastnetmon
|
||||
GH_TAGNAME = v1.1.6
|
||||
REVISION = 0
|
||||
GH_TAGNAME = v1.1.7
|
||||
|
||||
HOMEPAGE = https://fastnetmon.com/guides/
|
||||
|
||||
@ -30,8 +29,7 @@ LIB_DEPENDS = devel/boost \
|
||||
devel/json-c \
|
||||
databases/libhiredis
|
||||
|
||||
CONFIGURE_ARGS += -DENABLE_LUA_SUPPORT=Off \
|
||||
-DENABLE_DPI_SUPPORT=Off \
|
||||
CONFIGURE_ARGS += -DENABLE_DPI_SUPPORT=Off \
|
||||
-DENABLE_NETMAP_SUPPORT=Off \
|
||||
-DLOG4CPP_INCLUDES_FOLDER="${LOCALBASE}/include/log4cpp" \
|
||||
-DJSONC_INCLUDES_FOLDER="${LOCALBASE}/include/json-c" \
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (fastnetmon-1.1.6.tar.gz) = XyRiqkwcx6wdUn120RktGxsgUgoSIXDX5NU87IzxzqE=
|
||||
SIZE (fastnetmon-1.1.6.tar.gz) = 871028
|
||||
SHA256 (fastnetmon-1.1.7.tar.gz) = qlPCT+OSfSsLY/iInq4TSwKsu6G+5SRI3sgTz9DpR5E=
|
||||
SIZE (fastnetmon-1.1.7.tar.gz) = 871242
|
||||
|
@ -1,9 +1,9 @@
|
||||
$OpenBSD: patch-src_CMakeLists_txt,v 1.4 2020/06/25 07:28:29 jasper Exp $
|
||||
$OpenBSD: patch-src_CMakeLists_txt,v 1.5 2020/09/13 07:59:58 jasper Exp $
|
||||
|
||||
Index: src/CMakeLists.txt
|
||||
--- src/CMakeLists.txt.orig
|
||||
+++ src/CMakeLists.txt
|
||||
@@ -475,7 +475,7 @@ endif()
|
||||
@@ -472,7 +472,7 @@ endif()
|
||||
find_path(HIREDIS_INCLUDES_FOLDER NAMES hiredis/hiredis.h PATHS "${HIREDIS_CUSTOM_INSTALL_PATH}/include" NO_DEFAULT_PATH)
|
||||
|
||||
# Try to find hiredis library path
|
||||
@ -12,7 +12,7 @@ Index: src/CMakeLists.txt
|
||||
|
||||
if (HIREDIS_INCLUDES_FOLDER AND HIREDIS_LIBRARY_PATH)
|
||||
message(STATUS "We found hiredis library and will build Redis support ${HIREDIS_INCLUDES_FOLDER} ${HIREDIS_LIBRARY_PATH}")
|
||||
@@ -528,7 +528,7 @@ endif()
|
||||
@@ -525,7 +525,7 @@ endif()
|
||||
find_path(LOG4CPP_INCLUDES_FOLDER NAMES log4cpp/Appender.hh PATHS "${LOG4CPP_CUSTOM_INSTALL_PATH}/include" NO_DEFAULT_PATH)
|
||||
|
||||
# Try to find log4cpp library path
|
||||
@ -21,7 +21,7 @@ Index: src/CMakeLists.txt
|
||||
|
||||
if (LOG4CPP_INCLUDES_FOLDER AND LOG4CPP_LIBRARY_PATH)
|
||||
include_directories(${LOG4CPP_INCLUDES_FOLDER})
|
||||
@@ -540,7 +540,7 @@ endif()
|
||||
@@ -537,7 +537,7 @@ endif()
|
||||
### Look for jsonc
|
||||
|
||||
find_path(JSONC_INCLUDES_FOLDER NAMES json-c/json.h PATHS "${JSONC_CUSTOM_INSTALL_PATH}/include" NO_DEFAULT_PATH)
|
||||
@ -30,7 +30,7 @@ Index: src/CMakeLists.txt
|
||||
|
||||
if (JSONC_INCLUDES_FOLDER AND JSONC_LIBRARY_PATH)
|
||||
include_directories(${JSONC_INCLUDES_FOLDER})
|
||||
@@ -673,9 +673,9 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR ${CMAKE
|
||||
@@ -665,9 +665,9 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR ${CMAKE
|
||||
set(CMAKE_INSTALL_SBINDIR "bin")
|
||||
set(CMAKE_INSTALL_SYSCONFDIR "etc")
|
||||
else()
|
||||
@ -43,7 +43,7 @@ Index: src/CMakeLists.txt
|
||||
endif()
|
||||
|
||||
install(TARGETS fastnetmon DESTINATION "${CMAKE_INSTALL_SBINDIR}")
|
||||
@@ -683,13 +683,9 @@ install(TARGETS fastnetmon_client DESTINATION "${CMAKE
|
||||
@@ -675,13 +675,9 @@ install(TARGETS fastnetmon_client DESTINATION "${CMAKE
|
||||
|
||||
install(FILES fastnetmon.conf DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}")
|
||||
|
||||
|
13
net/fastnetmon/patches/patch-src_fast_endianless_hpp
Normal file
13
net/fastnetmon/patches/patch-src_fast_endianless_hpp
Normal file
@ -0,0 +1,13 @@
|
||||
$OpenBSD: patch-src_fast_endianless_hpp,v 1.1 2020/09/13 07:59:58 jasper Exp $
|
||||
|
||||
Index: src/fast_endianless.hpp
|
||||
--- src/fast_endianless.hpp.orig
|
||||
+++ src/fast_endianless.hpp
|
||||
@@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
+// For int32_t
|
||||
+#include <sys/types.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
// Linux standard functions for endian conversions are ugly because there are no checks about arguments length
|
@ -1,26 +0,0 @@
|
||||
$OpenBSD: patch-src_fast_library_cpp,v 1.2 2020/07/20 05:53:41 jasper Exp $
|
||||
|
||||
Use if_nametoindex(3) instead of SIOCGIFINDEX
|
||||
|
||||
Index: src/fast_library.cpp
|
||||
--- src/fast_library.cpp.orig
|
||||
+++ src/fast_library.cpp
|
||||
@@ -1307,10 +1307,18 @@ bool get_interface_number_by_device_name(int socket_fd
|
||||
|
||||
strncpy(ifr.ifr_name, interface_name.c_str(), sizeof(ifr.ifr_name));
|
||||
|
||||
+/* Attempt to use SIOCGIFINDEX if present. */
|
||||
+#ifdef SIOCGIFINDEX
|
||||
if (ioctl(socket_fd, SIOCGIFINDEX, &ifr) == -1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
interface_number = ifr.ifr_ifindex;
|
||||
+#else
|
||||
+ /* Fallback to if_nametoindex(3) otherwise. */
|
||||
+ interface_number = if_nametoindex(interface_name.c_str());
|
||||
+ if (interface_number == 0)
|
||||
+ return false;
|
||||
+#endif /* SIOCGIFINDEX */
|
||||
return true;
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
$OpenBSD: patch-src_fastnetmon_cpp,v 1.5 2020/06/25 07:38:16 jasper Exp $
|
||||
|
||||
https://github.com/pavel-odintsov/fastnetmon/pull/825
|
||||
|
||||
Index: src/fastnetmon.cpp
|
||||
--- src/fastnetmon.cpp.orig
|
||||
+++ src/fastnetmon.cpp
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
+#include <sys/socket.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <net/if_arp.h> // struct arphdr
|
||||
#include <netinet/if_ether.h>
|
||||
@@ -20,7 +21,6 @@
|
||||
#include <netinet/tcp.h>
|
||||
#include <netinet/udp.h>
|
||||
#include <sys/resource.h>
|
||||
-#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "bgp_flow_spec.h"
|
Loading…
x
Reference in New Issue
Block a user