Jason Ish
dc762cd44d
detect-flow: use new unit test macros
9 years ago
Victor Julien
ace8f9f5df
detect-flow: prefilter extra match support
9 years ago
Victor Julien
822e034753
detect-flow: implement prefilter
9 years ago
Victor Julien
e67ae0f174
detect keywords: use parse regex util func
9 years ago
Jason Ish
796dd5223b
tests: no longer necessary to provide successful return code
...
1 pass, 0 is fail.
9 years ago
Victor Julien
d834173bb8
detect-flow: use dedicated flags
...
The flow keyword used flag names that were shared with the
Packet::flowflags field. Some of the flags were'nt used by the packet
though. This lead to waste of some 'flag space'.
This patch defines dedicated flags for the flow keyword and removes
the otherwise unused flags from the FLOW_PKT_* space.
11 years ago
Ken Steele
923a77e952
Change Match() function to take const SigMatchCtx*
...
The Match functions don't need a pointer to the SigMatch object, just the
context pointer contained inside, so pass the Context to the Match function
rather than the SigMatch object. This allows for further optimization.
Change SigMatch->ctx to have type SigMatchCtx* rather than void* for better
type checking. This requires adding type casts when using or assigning it.
The SigMatch contex should not be changed by the Match() funciton, so pass it
as a const SigMatchCtx*.
11 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.
11 years ago
Victor Julien
beab8d401c
Convert flow keyword parsing to use pcre_copy_substring
12 years ago
Victor Julien
3470b07ea5
Fix several compile and runtime warnings found by clang 3.2 with the -fsanitize=address option.
12 years ago
Last G
8ae11f73b2
Added parentheses to fix Eclipse static code analysis
...
Fixed bug in action priority (REJECT_DST had lowest prio)
13 years ago
Eric Leblond
6842545331
Add documentation url in list-keyword output.
...
The output of the list-keyword is modified to include the url to
the keyword documentation when this is available. All documented
keywords should have their link set.
list-keyword can be used with an optional value:
no option or short: display list of keywords
csv: display a csv output on info an all keywords
all: display a human readable output of keywords info
$KWD: display the info about one keyword.
13 years ago
Victor Julien
50da0e80d5
Fix flow keyword compilation failure.
13 years ago
Anoop Saldanha
855726f372
fix for bug #575 .
...
If sig has no_stream set, don't mask it as requiring flow. Should get rid of
FNs any.
13 years ago
Eric Leblond
e176be6fcc
Use unlikely for error treatment.
...
When handling error case on SCMallog, SCCalloc or SCStrdup
we are in an unlikely case. This patch adds the unlikely()
expression to indicate this to gcc.
This patch has been obtained via coccinelle. The transformation
is the following:
@istested@
identifier x;
statement S1;
identifier func =~ "(SCMalloc|SCStrdup|SCCalloc)";
@@
x = func(...)
... when != x
- if (x == NULL) S1
+ if (unlikely(x == NULL)) S1
13 years ago
Eileen Donlon
2c24eb9e76
allow only one flow option in a rule
13 years ago
Anoop Saldanha
493c3db413
fix FNs for flow- only_stream and no_stream options
13 years ago
Anoop Saldanha
a4638fb0ad
code cleanup - replace SigMatchAppendPacket with SigMatchAppendSMToList
14 years ago
Victor Julien
21ee59e6f3
Add signature direction (flow:toserver/flow:toclient) as a signature flag.
14 years ago
Victor Julien
298289f43f
Let flow:only_stream and flow:no_stream set the require packet and require stream flags. Toss out sigs with conflicting settings. Rename flow:stream_only to flow:only_stream. Fixes #261 .
14 years ago
Victor Julien
2650551192
Rename signature init flags to indicate they are init flags.
14 years ago
Anoop Saldanha
bbbedaf963
fast pattern support for http_method. Also support relative modifiers
15 years ago
Victor Julien
014f62247a
Another batch of clang fixes. Nothing really serious. Includes a couple of fixes for broken fixes from yesterday.
15 years ago
Victor Julien
3f47eade6b
Fix couple of cases where incorrect handling of keyword parsing errors would lead to access of uninitialized memory. Found by clang.
15 years ago
Victor Julien
2f29b8a724
Improve detection of app layer, making sure we only handle app layer on 'established' packets. Should really fix #166 .
15 years ago
Victor Julien
83b2c8abdb
Improve stateful uri detection code.
15 years ago
Gerardo Iglesias Galvan
9f4fae5b1a
Fix inconsistent use of dynamic memory allocation
15 years ago
William Metcalf
ce01927515
Import of GPLv2 Header 050410
15 years ago
Victor Julien
8b30226914
Detection keyword cleanup
16 years ago
Victor Julien
b259e362cd
Convert uricontent to use new scanning methods as well. Move http_method and http_cookie keywords out of pmatch list for now.
16 years ago
Pablo Rincon
25a3a5c6d8
Adding mem wrapper to debug runtime alloc()/free() functions. Fixing some memory leaks.
16 years ago
Gerardo Iglesias Galvan
ba6d807a6e
Improve information about errors on signature failure
16 years ago
Pablo Rincon
583c686170
Allowing no case options for flow keyword. Adding unittests for this
16 years ago
Victor Julien
ecf86f9c23
Rename to Suricata.
16 years ago
Victor Julien
2d0e9658f8
Speed up per sgh content maxlen calc. Remove mpm ptrs from mpm ctx. Add unittests testing the detection engine internals.
16 years ago
Breno Silva
c43319c337
Regular expression for UnitTests
...
Signed-off-by: Brian Rectanus <brectanu@gmail.com>
16 years ago
Victor Julien
0d0ffb9963
Reorganize header inclusions.
16 years ago
Victor Julien
1132ab635a
Rename all pmt->det_ctx.
16 years ago
Victor Julien
b9972a9d2c
Cleanups
16 years ago
Victor Julien
97854cf4bb
Fixup some rule parser memleaks
16 years ago
Brian Rectanus
fa5939ca91
64 bit cleanup part2
16 years ago
Victor Julien
646262a755
Small cleanups.
16 years ago
William Metcalf
3046cf391d
Small printf fixes to detect-flow
16 years ago
William Metcalf
9b4c0d057f
Updated flow parsing code for validation, added unit tests, fixed statless check
16 years ago
Victor Julien
ffa013b2d8
Implement flow:established and flow:stateless
16 years ago
Victor Julien
5df5b35e90
Put all globals in the detection engine ctx. Add HashList type, a hash that also stores the items ina list to it can be traversed. Many cleanups.
16 years ago
Victor Julien
bab4b62376
Initial add of the files.
16 years ago