diff options
author | Leo <thinkabit.ukim@gmail.com> | 2020-11-25 05:58:41 -0300 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2020-11-25 05:58:41 -0300 |
commit | 62c4a5a54820b196773d00dea37125a3fe188dd9 (patch) | |
tree | ae021ced796a21b754b684ffbd541c59a30e52dc | |
parent | 65430572d881f25a400a81847c94129d8dee9333 (diff) |
main/snort: upgrade to 2.9.15.1
-rw-r--r-- | main/snort/APKBUILD | 6 | ||||
-rw-r--r-- | main/snort/gcc-10.patch | 113 |
2 files changed, 117 insertions, 2 deletions
diff --git a/main/snort/APKBUILD b/main/snort/APKBUILD index 683c93cb3b0..3e671b535a9 100644 --- a/main/snort/APKBUILD +++ b/main/snort/APKBUILD @@ -3,7 +3,7 @@ # Contributor: Leonardo Arena <rnalrd@alpinelinux.org> # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=snort -pkgver=2.9.14.1 +pkgver=2.9.15.1 pkgrel=0 pkgdesc="An open source network intrusion prevention and detection system" url="https://www.snort.org/" @@ -15,6 +15,7 @@ makedepends="pcre-dev libpcap-dev libnet-dev libdnet-dev daq-dev daq-static install="$pkgname.pre-install" subpackages="$pkgname-doc $pkgname-dev $pkgname-openrc" source="https://www.snort.org/downloads/archive/snort/snort-$pkgver.tar.gz + gcc-10.patch snort.initd snort.confd " @@ -73,6 +74,7 @@ package() { touch "$pkgdir"/var/lib/snort/rules/black_list.rules } -sha512sums="e6ba293437cc1555a746106c664f00f7170af8cbb7df4e5eb23679a03048b2e80dc7407474dead40fb0fb125cddffe5bafba4b9afe3a02d6bb834ef9b657f822 snort-2.9.14.1.tar.gz +sha512sums="9940f5bcdcf04823f9cb5c3f8efda72f98f6a47bce9f40399dec9ec41d23a386c7f7e44861d82368de31546123b920f9fc617197bbf9c5e750724bf8b9e19590 snort-2.9.15.1.tar.gz +f79ed06b85cc862dc96a0445065ca663ca82fa73e4d547e8a631b6cafed6816143a602087d788d876bc37e0517a78cfcfa20d838e3c479883d6ae3f24f98b14f gcc-10.patch c71d11f4cde4aba432641d3915faec8070e9fea5b33c71f6b2872b2208871180b3c7dbbadd2ddaebe5f3280adf7c5c9daf1585afd331fe552486a675ff676e52 snort.initd b21491ba5798a5ce3a03a61ada391a667f1684aaf86e7536abb9dd975f6acefe75688c60b8ce28cbfb0c4e66ec19078e468792289d26f1f2e2d401609fd22771 snort.confd" diff --git a/main/snort/gcc-10.patch b/main/snort/gcc-10.patch new file mode 100644 index 00000000000..e661d27db05 --- /dev/null +++ b/main/snort/gcc-10.patch @@ -0,0 +1,113 @@ +Upstream: Should be, taken from Gentoo +Reason: Fixes compilation on gcc-10 + +--- a/src/preprocessors/Stream6/stream_paf.h ++++ b/src/preprocessors/Stream6/stream_paf.h +@@ -68,12 +68,14 @@ + uint16_t s5_paf_port_registration_all (void* pv, uint16_t port, bool c2s, bool flush); + uint16_t s5_paf_service_registration (void* pv, uint16_t service, bool c2s, bool flush); + +-enum FlushMode ++typedef enum + { + FLUSH_MODE_NORMAL = 0, + FLUSH_MODE_PRE_DISCARD, + FLUSH_MODE_DISCARD +-}FlushMode; ++} FlushMode_t; ++ ++extern FlushMode_t FlushMode; + + typedef struct { + void* user[MAX_PAF_USER]; // arbitrary user data +--- a/src/sfutil/util_jsnorm.h ++++ b/src/sfutil/util_jsnorm.h +@@ -42,5 +42,7 @@ + uint16_t alerts; + }JSState; + ++extern int hex_lookup[256]; ++ + int JSNormalizeDecode(char *, uint16_t , char *, uint16_t destlen, char **, int *, JSState *, uint8_t *); + void InitJSNormLookupTable(void); +--- a/src/preprocessors/spp_session.h ++++ b/src/preprocessors/spp_session.h +@@ -28,6 +28,10 @@ + #include "decode.h" + #include "session_common.h" + ++#ifdef PERF_PROFILING ++extern PreprocStats sessionPerfStats; ++#endif ++ + /* list of function prototypes for this preprocessor */ + void SetupSessionManager(void); + void SessionReload(struct _SessionCache* lws_cache, uint32_t max_sessions, +--- a/src/preprocessors/spp_httpinspect.c ++++ b/src/preprocessors/spp_httpinspect.c +@@ -161,7 +161,6 @@ + MemPool *http_mempool = NULL; + MemPool *mime_decode_mempool = NULL; + MemPool *mime_log_mempool = NULL; +-int hex_lookup[256]; + int valid_lookup[256]; + + char** xffFields = NULL; +--- a/src/detection-plugins/sp_session.c ++++ b/src/detection-plugins/sp_session.c +@@ -80,7 +80,7 @@ + #include "snort.h" + #include "profiler.h" + #ifdef PERF_PROFILING +-PreprocStats sessionPerfStats; ++PreprocStats sp_sessionPerfStats; + extern PreprocStats ruleOTNEvalPerfStats; + #endif + +@@ -149,7 +149,7 @@ + /* map the keyword to an initialization/processing function */ + RegisterRuleOption("session", SessionInit, NULL, OPT_TYPE_LOGGING, NULL); + #ifdef PERF_PROFILING +- RegisterPreprocessorProfile("session", &sessionPerfStats, 3, &ruleOTNEvalPerfStats, NULL); ++ RegisterPreprocessorProfile("session", &sp_sessionPerfStats, 3, &ruleOTNEvalPerfStats, NULL); + #endif + DEBUG_WRAP(DebugMessage(DEBUG_PLUGIN, "Plugin: Session Setup\n");); + } +@@ -287,7 +287,7 @@ + FILE *session; /* session file ptr */ + PROFILE_VARS; + +- PREPROC_PROFILE_START(sessionPerfStats); ++ PREPROC_PROFILE_START(sp_sessionPerfStats); + + /* if there's data in this packet */ + if(p != NULL) +@@ -298,7 +298,7 @@ + + if(session == NULL) + { +- PREPROC_PROFILE_END(sessionPerfStats); ++ PREPROC_PROFILE_END(sp_sessionPerfStats); + return DETECTION_OPTION_MATCH; + } + +@@ -308,7 +308,7 @@ + } + } + +- PREPROC_PROFILE_END(sessionPerfStats); ++ PREPROC_PROFILE_END(sp_sessionPerfStats); + return DETECTION_OPTION_MATCH; + } + +--- a/src/detection-plugins/sp_session.h ++++ b/src/detection-plugins/sp_session.h +@@ -29,5 +29,8 @@ + void SetupSession(void); + uint32_t SessionHash(void *d); + int SessionCompare(void *l, void *r); ++#ifdef PERF_PROFILING ++extern PreprocStats sp_sessionPerfStats; ++#endif + + #endif /* __SP_SESSION_H__ */ |