From: Russ Combs Date: Mon, 26 Jan 2015 23:01:29 +0000 (-0500) Subject: fix merge X-Git-Tag: 3.0.0-233~1065 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e41db3082236632ec24616a7c3c76d335ba1edb6;p=thirdparty%2Fsnort3.git fix merge --- diff --git a/configure.ac b/configure.ac index 8180d6284..f3a2c7bcc 100644 --- a/configure.ac +++ b/configure.ac @@ -124,6 +124,20 @@ AC_CHECK_PROG(have_dblatex,dblatex,yes,no) AM_CONDITIONAL(MAKE_PDF_DOC, [test "x$have_dblatex" = "xyes" -a "x$have_asciidoc" = "xyes"]) +AC_MSG_CHECKING(for sparc) +if eval "echo $host_cpu|grep -i sparc >/dev/null"; then + AC_DEFINE([WORDS_MUSTALIGN],[1],[Define if words must align]) + AC_MSG_RESULT(yes) + + # gcc, sparc and optimization not so good + if test -n "$GCC"; then + NO_OPTIMIZE="yes" + fi +else + AC_MSG_RESULT(no) +fi + + #-------------------------------------------------------------------------- # visibility foo #-------------------------------------------------------------------------- diff --git a/src/detection/tag.cc b/src/detection/tag.cc index be2f68b9e..795f61e7e 100644 --- a/src/detection/tag.cc +++ b/src/detection/tag.cc @@ -111,8 +111,8 @@ static THREAD_LOCAL uint32_t last_prune_time = 0; static THREAD_LOCAL uint32_t tag_alloc_faults = 0; static THREAD_LOCAL uint32_t tag_memory_usage = 0; -static bool s_exclusive = false; -static unsigned s_sessions = 0; +static THREAD_LOCAL bool s_exclusive = false; +static THREAD_LOCAL unsigned s_sessions = 0; // TBD when tags leverage sessions, tag nodes can be freed at end // of session. then we can configure this to allow multiple diff --git a/src/time/profiler.cc b/src/time/profiler.cc index 0fee05309..bcdd466fd 100644 --- a/src/time/profiler.cc +++ b/src/time/profiler.cc @@ -168,7 +168,7 @@ void ResetRuleProfiling(void) { otn = (OptTreeNode *)hashNode->data; { - rtn = getRtnFromOtn(otn, policyId); + rtn = getRtnFromOtn(otn); if (rtn == NULL) continue; diff --git a/src/utils/sf_email_attach_decode.h b/src/utils/sf_email_attach_decode.h index b21a21a2d..42d776f6f 100644 --- a/src/utils/sf_email_attach_decode.h +++ b/src/utils/sf_email_attach_decode.h @@ -42,23 +42,23 @@ typedef enum { } DecodeType; -typedef struct s_Base64_DecodeState +struct Base64_DecodeState { uint32_t encode_bytes_read; uint32_t decode_bytes_read; int encode_depth; int decode_depth; -} Base64_DecodeState; +}; -typedef struct s_QP_DecodeState +struct QP_DecodeState { uint32_t encode_bytes_read; uint32_t decode_bytes_read; int encode_depth; int decode_depth; -} QP_DecodeState; +}; -typedef struct s_UU_DecodeState +struct UU_DecodeState { uint32_t encode_bytes_read; uint32_t decode_bytes_read; @@ -66,15 +66,15 @@ typedef struct s_UU_DecodeState int decode_depth; uint8_t begin_found; uint8_t end_found; -} UU_DecodeState; +}; -typedef struct s_BitEnc_DecodeState +struct BitEnc_DecodeState { uint32_t bytes_read; int depth; -} BitEnc_DecodeState; +}; -typedef struct s_Email_DecodeState +struct Email_DecodeState { DecodeType decode_type; uint8_t decode_present; @@ -89,7 +89,14 @@ typedef struct s_Email_DecodeState UU_DecodeState uu_state; BitEnc_DecodeState bitenc_state; -} Email_DecodeState; +}; + +struct MimeStats +{ + uint64_t memcap_exceeded; + uint64_t attachments[DECODE_ALL]; + uint64_t decoded_bytes[DECODE_ALL]; +}; typedef struct _MimeStats {