Shivani Bhardwaj
6f7d8e50c8
src: use FatalError whenever possible
...
Replaces all patterns of SCLogError() followed by exit() with
FatalError(). Cocci script to do this:
@@
constant C;
constant char[] msg;
@@
- SCLogError(C,
+ FatalError(SC_ERR_FATAL,
msg);
- exit(EXIT_FAILURE);
Closes redmine ticket 3188.
6 years ago
Shivani Bhardwaj
e7c0f0ad91
src: remove multiple uses of atoi
...
atoi() and related functions lack a mechanism for reporting errors for
invalid values. Replace them with calls to the appropriate
ByteExtractString* functions.
Partially closes redmine ticket #3053 .
6 years ago
Giuseppe Longo
c63fea8d0a
reputation: remove dead code
...
This removes some code commented long time ago.
7 years ago
Giuseppe Longo
6b2a5ef21e
reputation: declare max value as constant
7 years ago
Giuseppe Longo
d0e2420faf
reputation: move unit tests
...
UTs are moved inside "test/" directory,
and reworked to improve readability and reduce lines of code.
7 years ago
Victor Julien
961610489a
iprep: small cleanups
8 years ago
Victor Julien
5740c79b93
iprep: improve error checking of path handling
8 years ago
Victor Julien
ab1200fbd7
compiler: more strict compiler warnings
...
Set flags by default:
-Wmissing-prototypes
-Wmissing-declarations
-Wstrict-prototypes
-Wwrite-strings
-Wcast-align
-Wbad-function-cast
-Wformat-security
-Wno-format-nonliteral
-Wmissing-format-attribute
-funsigned-char
Fix minor compiler warnings for these new flags on gcc and clang.
9 years ago
Victor Julien
65d2443ccd
reputation: fix -Wshadow warnings
10 years ago
Victor Julien
b3bf7a5729
output: introduce config and perf output levels
...
Goal is to reduce info output
10 years ago
maxtors
9d3fd82849
Removed duplicate include statements.
10 years ago
Jason Ish
796dd5223b
tests: no longer necessary to provide successful return code
...
1 pass, 0 is fail.
10 years ago
Victor Julien
4ee20f2649
asan: fix reputation code include
11 years ago
Tom DeCanio
97a2d1ac26
fix reputation parser so that it accepts ipv6 addresses in configuration file.
11 years ago
Victor Julien
033409a042
iprep: cleanup ctx on shutdown
...
~~Dr.M~~ Error #1 : LEAK 480 direct bytes 0x0aae7fc0-0x0aae81a0 + 0 indirect bytes
~~Dr.M~~ # 0 replace_malloc [/work/drmemory_package/common/alloc_replace.c:2373]
~~Dr.M~~ # 1 SRepInit [.../Suricata/src/reputation.c:594]
~~Dr.M~~ # 2 DetectEngineCtxInit [.../src/detect-engine.c:844]
~~Dr.M~~ # 3 main [.../Suricata/src/suricata.c:2230]
12 years ago
Giuseppe Longo
395d5b7f61
iprep: add unit tests for cidr
...
Implements unit tests to test the new API
12 years ago
Giuseppe Longo
a1d8439b25
iprep: extends cidr support
...
Implements new API to expand the IP reputation
to netblocks with CIDR notation
A new object 'srepCIDRTree' is kept in the DetectionEngineCtx,
which contains two tree (one for ipv4 and one for ipv6)
where the reputation values are stored.
12 years ago
Ken Steele
8f1d75039a
Enforce function coding standard
...
Functions should be defined as:
int foo(void)
{
}
Rather than:
int food(void) {
}
All functions where changed by a script to match this standard.
12 years ago
Victor Julien
fd193107de
unused reputation: radix update
...
Update the unused reputation code to compile after radix update.
13 years ago
Victor Julien
64203be3ba
iprep: fix reputation loading and reloading
...
When an IP is listed in multiple categories, each new "load" would clear the
previous loads for that IP.
Bug #976
13 years ago
Duarte Silva
0a5c798729
Now using the common functions
...
- Removed some non printable ANSI characters
- Removed unecessary include
13 years ago
Victor Julien
98dbf3e62c
Coverity 1038113: possibly out of bounds read
13 years ago
Victor Julien
274641abc2
Fix valgrind error/warning in ip reputation parsing code
14 years ago
Victor Julien
8924d7598d
Fix potential iprep file parsing issue (2).
14 years ago
Victor Julien
754ae8a1be
Fix potential iprep file parsing issue.
14 years ago
Victor Julien
40bbf96f22
reputation: don't give error if config is missing/commented out
14 years ago
Victor Julien
83bfe3810b
reputation: report error if host table memcap reached. Work around compilation failure with atomic fallback code.
14 years ago
Victor Julien
e30b1bfe64
Simple IP reputation implementation
14 years ago
Victor Julien
426a7de5f2
Fix compiler warning about incomplete prototype (2).
16 years ago
Gerardo Iglesias Galvan
9f4fae5b1a
Fix inconsistent use of dynamic memory allocation
16 years ago
William Metcalf
ce01927515
Import of GPLv2 Header 050410
16 years ago
Pablo Rincon
e7a989e305
IP Only Engine using radix trees
17 years ago
Pablo Rincon
25a3a5c6d8
Adding mem wrapper to debug runtime alloc()/free() functions. Fixing some memory leaks.
17 years ago
Pablo Rincon
ad2c136e8f
Renaming errors (naming conventions)
17 years ago
Pablo Rincon
260e581929
First version of the reputation API
17 years ago