Signed-off-by: W. Michael Petullo <mike@flyn.org>lilik-openwrt-22.03
@ -1,52 +0,0 @@ | |||
diff -u --recursive snort-3.0.0-vanilla/daqs/daq_file.c snort-3.0.0/daqs/daq_file.c | |||
--- snort-3.0.0-vanilla/daqs/daq_file.c 2018-08-28 02:01:02.000000000 -0400 | |||
+++ snort-3.0.0/daqs/daq_file.c 2019-03-28 23:03:25.292770141 -0400 | |||
@@ -33,7 +33,7 @@ | |||
#include <sys/types.h> | |||
#include <sys/time.h> | |||
-#include <sys/unistd.h> | |||
+#include <unistd.h> | |||
#include <daq_api.h> | |||
#include <sfbpf_dlt.h> | |||
diff -u --recursive snort-3.0.0-vanilla/daqs/daq_hext.c snort-3.0.0/daqs/daq_hext.c | |||
--- snort-3.0.0-vanilla/daqs/daq_hext.c 2018-08-28 02:01:02.000000000 -0400 | |||
+++ snort-3.0.0/daqs/daq_hext.c 2019-03-28 22:54:15.738207157 -0400 | |||
@@ -35,7 +35,7 @@ | |||
#include <arpa/inet.h> | |||
#include <sys/types.h> | |||
#include <sys/time.h> | |||
-#include <sys/unistd.h> | |||
+#include <unistd.h> | |||
#include <sys/socket.h> | |||
#include <daq_api.h> | |||
diff -u --recursive snort-3.0.0-vanilla/src/network_inspectors/appid/service_plugins/service_rpc.cc snort-3.0.0/src/network_inspectors/appid/service_plugins/service_rpc.cc | |||
--- snort-3.0.0-vanilla/src/network_inspectors/appid/service_plugins/service_rpc.cc 2018-08-28 02:01:02.000000000 -0400 | |||
+++ snort-3.0.0/src/network_inspectors/appid/service_plugins/service_rpc.cc 2019-03-28 22:32:04.211783669 -0400 | |||
@@ -27,6 +27,7 @@ | |||
#include <netdb.h> | |||
+#include <tirpc/rpc/rpcent.h> | |||
#if defined(__FreeBSD__) || defined(__OpenBSD__) | |||
#include <rpc/rpc.h> | |||
#elif defined(__sun) | |||
diff -u --recursive snort-3.0.0-vanilla/src/utils/util.cc snort-3.0.0/src/utils/util.cc | |||
--- snort-3.0.0-vanilla/src/utils/util.cc 2018-08-28 02:01:02.000000000 -0400 | |||
+++ snort-3.0.0/src/utils/util.cc 2019-03-28 22:16:16.860942230 -0400 | |||
@@ -605,13 +605,8 @@ | |||
{ | |||
static THREAD_LOCAL char buf[128]; | |||
-#if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE < 200112L && \ | |||
- defined(_XOPEN_SOURCE) && _XOPEN_SOURCE < 600) || _GNU_SOURCE | |||
- return strerror_r(errnum, buf, sizeof(buf)); | |||
-#else | |||
(void)strerror_r(errnum, buf, sizeof(buf)); | |||
return buf; | |||
-#endif | |||
} | |||
char* snort_strndup(const char* src, size_t dst_size) |
@ -1,11 +0,0 @@ | |||
diff -u --recursive snort-3.0.0-vanilla/cmake/include_libraries.cmake snort-3.0.0/cmake/include_libraries.cmake | |||
--- snort-3.0.0-vanilla/cmake/include_libraries.cmake 2018-08-28 02:01:02.000000000 -0400 | |||
+++ snort-3.0.0/cmake/include_libraries.cmake 2019-04-18 21:25:25.627070082 -0400 | |||
@@ -14,7 +14,6 @@ | |||
endif (ENABLE_UNIT_TESTS) | |||
# optional libraries | |||
-find_package(LibLZMA QUIET) | |||
find_package(Asciidoc QUIET) | |||
find_package(DBLATEX QUIET) | |||
find_package(Ruby QUIET 1.8.7) |
@ -1,43 +0,0 @@ | |||
--- a/src/codecs/ip/cd_ipv4.cc 2018-08-28 02:01:02.000000000 -0400 | |||
+++ b/src/codecs/ip/cd_ipv4.cc 2020-07-04 17:45:57.125755874 -0400 | |||
@@ -358,8 +358,8 @@ | |||
/* Loopback traffic - don't use htonl for speed reasons - | |||
* s_addr is always in network order */ | |||
#ifdef WORDS_BIGENDIAN | |||
- msb_src = (iph.ip_src >> 24); | |||
- msb_dst = (iph.ip_dst >> 24); | |||
+ msb_src = ((*iph).ip_src >> 24); | |||
+ msb_dst = ((*iph).ip_dst >> 24); | |||
#else | |||
msb_src = (uint8_t)(iph->ip_src & 0xff); | |||
msb_dst = (uint8_t)(iph->ip_dst & 0xff); | |||
--- a/src/network_inspectors/appid/appid_detector.h 2018-08-28 02:01:02.000000000 -0400 | |||
+++ b/src/network_inspectors/appid/appid_detector.h 2020-07-04 18:07:24.196714422 -0400 | |||
@@ -52,6 +52,27 @@ | |||
DETECTOR_TYPE_NOT_SET | |||
}; | |||
+#define BYTE_SWAP_16(x) \ | |||
+ ((uint16_t)((((uint16_t)(x) & 0xff00) >> 8) | \ | |||
+ (((uint16_t)(x) & 0x00ff) << 8))) | |||
+ | |||
+#define BYTE_SWAP_32(x) \ | |||
+ ((uint32_t)((((uint32_t)(x) & 0xff000000) >> 24) | \ | |||
+ (((uint32_t)(x) & 0x00ff0000) >> 8) | \ | |||
+ (((uint32_t)(x) & 0x0000ff00) << 8) | \ | |||
+ (((uint32_t)(x) & 0x000000ff) << 24))) | |||
+ | |||
+#define BYTE_SWAP_64(x) \ | |||
+ ((uint64_t)((((uint64_t)(x) & 0xff00000000000000ULL) >> 56) | \ | |||
+ (((uint64_t)(x) & 0x00ff000000000000ULL) >> 40) | \ | |||
+ (((uint64_t)(x) & 0x0000ff0000000000ULL) >> 24) | \ | |||
+ (((uint64_t)(x) & 0x000000ff00000000ULL) >> 8) | \ | |||
+ (((uint64_t)(x) & 0x00000000ff000000ULL) << 8) | \ | |||
+ (((uint64_t)(x) & 0x0000000000ff0000ULL) << 24) | \ | |||
+ (((uint64_t)(x) & 0x000000000000ff00ULL) << 40) | \ | |||
+ (((uint64_t)(x) & 0x00000000000000ffULL) << 56))) | |||
+ | |||
+ | |||
typedef std::vector<AppRegistryEntry> FlowApplicationInfo; | |||
struct AppIdFlowContentPattern |