Commit Graph

11161 Commits (a843b36c97818ce0ecb5f00bf09bdeca4bd14272)
 

Author SHA1 Message Date
Victor Julien 51726e0a0f thash: add 'remove' support 6 years ago
Victor Julien b80ab56d10 datasets: improve 'dataset-add' error checking 6 years ago
Victor Julien ff55a444d4 datasets: fix return values for 'add's 6 years ago
Victor Julien 381bc2dd64 datasets: fix ref cnt handling
Each 'add' and 'lookup' would increment the use_cnt, without anything
bringing it back down.

Since there is no removal yet, nothing is actually affected by it yet.
6 years ago
Victor Julien 03dc5d1d74 datasets: silence noisy 'dataset-add' log 6 years ago
Victor Julien f8159bd372 build: default to c11 standard
Rearrange pcap includes to fix builds on MinGW
6 years ago
Victor Julien 1893e40e79 build: don't limit C std to c99 (gnu99)
Now that C11 atomics and thread local storage are supported, the
compiler can figure out what version to use.
6 years ago
Victor Julien 7691fc4f9e configure: check for u_int and friends 6 years ago
Victor Julien cb4b5296da fuzz: include pcap headers through suricata-common.h 6 years ago
Victor Julien d4f86e3709 threads: remove u_long usage 6 years ago
Victor Julien 3ba4afd40b threads: make thread local storage manadatory
Support either the __thread GNUism or the C11 _Thread_local.

Use 'thread_local' to point to the one that is used. Convert existing
__thread user to 'thread_local'.

Remove non-thread-local code from the packet pool code.
6 years ago
Victor Julien 32cfd71f1a atomics: stdatomics.h version of SC_ATOMIC_* wrappers 6 years ago
Victor Julien 7553937a22 detect-engine/tags: avoid confusion over data type 6 years ago
Victor Julien 5b9d17b485 atomics: remove unused macros 6 years ago
Victor Julien c83a607b6a atomics: add SC_ATOMIC_INITPTR macro
Until now both atomic ints and pointers were initialized by SC_ATOMIC_INIT
by setting them to 0. However, C11's atomic pointer type cannot be
initialized this way w/o causing compiler warnings.

As a preparation to supporting C11's atomics, this patch introduces a
new macro to initialize atomic pointers and updates the relevant callers
to use it.
6 years ago
Victor Julien 531ff3ddec atomics: change SC_ATOMIC_ADD to 'fetch_add'
Until this point the SC_ATOMIC_ADD macro pointed to a 'add_fetch'
intrinsic. This patch changes it to a 'fetch_add'.

There are 2 reasons for this:

1. C11 stdatomics.h has only 'atomic_fetch_add' and no 'add_fetch'
   So this patch prepares for adding support for C11 atomics.

2. It was not consistent with SC_ATOMIC_SUB, which did use 'fetch_sub'
   and not 'sub_fetch'.

Most callers are not using the return value, so these are unaffected.
The callers that do use the return value are updated.
6 years ago
Victor Julien 109b2ae551 atomics: avoid unnecessary (direct) CAS use 6 years ago
Victor Julien c660757153 atomics: remove useless SC_ATOMIC_DESTROY 6 years ago
Victor Julien 1cb7eec52d atomics: remove spinlocked fallback 6 years ago
Victor Julien 967340e901 fuzz: fix applayer eof check segv 6 years ago
Philippe Antoine 4fda7ed4bd fuzz: stop app layer target as Suricata
Before being overwhelmed by successive errors
6 years ago
Philippe Antoine fe1d36ec7e conf: returns instead of exiting in ConfYamlParse
So that we can keep on fuzzing even on too much recursion
6 years ago
Victor Julien dfdf2eb050 fuzz: add missing debug validation to configure 6 years ago
Victor Julien c76f98073e fuzz: add configure wrapper for oss-fuzz 6 years ago
Victor Julien 5e13816380 includes: don't include sys/types.h twice 6 years ago
Victor Julien df79613fb5 privs: include headers in suricata-common.h 6 years ago
Victor Julien 61c9e01f87 conf/yaml: include yaml.h after suricata-common.h 6 years ago
Sascha Steinbiss 5598ff5bb3 doc/install: refer to buster as Debian stable 6 years ago
Victor Julien f6bf86f136 fuzz/sigpcap: enable all of eve 6 years ago
Victor Julien 4d50eb1647 detect/iponly: fix parsing of '0' valued netmask 6 years ago
Victor Julien d4613e5c70 util/mem: reduce scope of win32 specific include 6 years ago
Victor Julien 415c992909 util/mem: cleanup by moving atomic from mem hdr 6 years ago
Victor Julien 3b877929e3 util/mem: move most logic to functions
Reduce macro use and simplify code. Also reduces compiled code
size.
6 years ago
Victor Julien 48bb26abe7 util/mem: remove old debug code for counting allocs 6 years ago
Victor Julien 481a1923b4 logging: turn SCLog and SCLogErr into funcs
Reduces compiled code size.
6 years ago
Victor Julien 64e307936e common: add ATTR_FMT_PRINTF wrapper
Wraps around __attribute__((format(printf, (x), (y))))
6 years ago
Victor Julien a8c8e2d5c9 common: use suricata-common.h in more places 6 years ago
Victor Julien b856caad94 common: use WARN_UNUSED macro 6 years ago
Victor Julien f903766849 detect/mpm: don't process empty store 6 years ago
Victor Julien a95fa3c156 dns/tests: comment typo fixes 6 years ago
Victor Julien d5712efc91 decode: return bool network layer
So that the caller can set the correct event type on error.
6 years ago
Victor Julien 328a94206e decode/hdlc: initial support 6 years ago
Victor Julien 136d351e40 decode: single network layer entrypoint
This way new layers can be added in a single place.
6 years ago
Victor Julien 88bccfb80e decode: create linklayer entry point
Make AF_PACKET and PCAP mode use it.
6 years ago
Victor Julien 685d490d07 decode/ieee8021ah: fix possible packet truncation 6 years ago
Victor Julien 5404dc7f6d fuzz/siginit: cleanup detect engine every 1024 runs 6 years ago
Andreas Herz aaa604b4c6 app-layer-template: fix log typo 6 years ago
Jason Ish 4dc80a6e6f conf/yaml: limit recursion depth while paring YAML
A deeply nested YAML file can cause a stack-overflow while
reading in the configuration to do the recursive parser. Limit
the recursion level to something sane (128) to prevent this
from happening.

The default Suricata configuration has a recursion level of 128
so there is still lots of room to grow (not that we should).

Redmine ticket:
https://redmine.openinfosecfoundation.org/issues/3630
6 years ago
Victor Julien fc6ada8541 detect/parse: properly free bidir sigs in error path 6 years ago
Victor Julien 5abead9325 detect/parse: fix minor memory leak in error path
Only reachable on SCMalloc so should be unlikely to be reached.
6 years ago