Commit Graph

3637 Commits (5a6c8c0f011be83c2b4821478f30120cf954f970)
 

Author SHA1 Message Date
Victor Julien 50da0e80d5 Fix flow keyword compilation failure. 13 years ago
Anoop Saldanha 3d74fa964a Update all flow referencing to use the new FlowReference and FlowDeReference
macros.
13 years ago
Anoop Saldanha 6c68f86b8c fix for bug #557.
In FFRv2, dereference flow from a packet using the new reference/dereference
util macros.  This allows the decr use_cnt for flow and reseting the flow
pointer to NULL for the pseudo pkt to happen simultaneously, in case there we
fail to retrieve a pseudo_packet and have to return the already obtained
pseudo packets, back to the packetpool.
13 years ago
Anoop Saldanha 88e89d6302 Introduce utility flow macros to help referencing/dereferencing flows. 13 years ago
Anoop Saldanha 4d501778e9 fix for bug #557.
Reset hhd buffers list len if we exit before allocating the buffer.
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
Victor Julien 1598425a40 detect: properly store a stateful match if it happens at the start of inspection 13 years ago
Victor Julien c3f4f8d46a Dead code cleanup. Coverity 728047, 728048, 728049. 13 years ago
Victor Julien ee5d6fdb6f profiling: fix some profiling info missing from output 13 years ago
Eric Leblond ffbbff9d6c tm-thread: detect thread death
When a thread is dead at init the THV_INIT_DONE flag is not set
and the spawn function can freeze (see bug #553 for an example).
In this case THV_RUNNING_DONE is set and we can also check on this
state for leaving the function. This should fix #bug553
13 years ago
Victor Julien af7f4b347d threshold: improve comments of shipped threshold.config, add links to wiki. 13 years ago
Anoop Saldanha 4e3b206f7b fix http server/client body handling. Update body status based on tx state. 13 years ago
Victor Julien 82fc61770b threshold: allow threshold.config to override rule
Allow threshold.conf to override rule thresholds in the following
cases:

- threshold.config rule uses threshold or event_filter AND
- threshold.config rule applies to a single signature (so no
  gid 0 or sid 0)

Confirmed to work with both threshold and detection_filter rule
keywords.

Part of bug #425.
13 years ago
Victor Julien a0c43a8a1c Minor parsing cleanups in detect-engine options. 13 years ago
Victor Julien b6f573d9cb yaml: add addr and port vars commonly used by ET/ETpro 13 years ago
Eric Leblond 28ca36acf7 coccinelle: add test on malloc error check.
This patch adds a coccinelle code check on SCMalloc, SCCalloc and
SCStrdup and other memory handling functions. It verifies that the
error checking is made.
13 years ago
Eric Leblond 9f13572843 Fix indentation of win32 files. 13 years ago
Eric Leblond 710d237724 Add missing sctrdup test 13 years ago
Eric Leblond 3d2998a9cf coccinelle: don't test UNITTEST code 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
Eric Leblond d292004880 Add some missing checks of SCStrdup return. 13 years ago
Eric Leblond 655577cbbc Add some missing checks of SCMalloc return. 13 years ago
Victor Julien d8667448c1 threshold: allow suppression for sigs with threshold set. Part of #425. 13 years ago
Anoop Saldanha f9a6c890d4 fix for #529
Respect pcre's anchor during content inspection.
13 years ago
Anoop Saldanha 19e8f82f25 Unittest to display #bug 529. pcre anchor not respected 13 years ago
Anoop Saldanha b0b4052860 detect-pcre.c cleanup. Delete old pcre functions that we no longer use. 13 years ago
Eric Leblond 680e941a8f af-packet: clean APFPacketVar before release.
This patch resets the AFPPacketVar linked to a Packet in the release
function to avoid any side effect when the packet is reused. To do
so a new AFPV_CLEANUP macro has been introduced.
13 years ago
Eric Leblond 775f379e2b decode: clean release function 13 years ago
Anoop Saldanha 21f92c0a89 Give priority to non stream content over stream content when selecting fast
pattern.
13 years ago
Victor Julien a08a0e9161 Minor output cleanup 13 years ago
Victor Julien abc3f903f9 Fix defrag compilation warning. 13 years ago
Victor Julien 525367113a Fix compilation if luajit is disabled. 13 years ago
Victor Julien d1abd552e9 luajit: correct offset passed to script for lua's array idx starting at 1. Add http.response_headers and http.response_headers.raw buffers. 13 years ago
Victor Julien 20d2db085e reintroduce pool free func for cases where block alloc is not used. 13 years ago
Victor Julien 98484ffdcc luajit: prealloc lua states to increases chances of alloc success. Luajit requires them to be in memory <2GB. 13 years ago
Victor Julien f962e3de29 pool: only alloc one large block if it will actually be used. 13 years ago
Victor Julien 6f7e527e92 luajit: fix crash at shutdown / rule reload if lua script didn't properly init. 13 years ago
Eric Leblond 8192f6ce8c Add missing include in flow-manager
DefragTimeoutHash was not declared before being used.
13 years ago
Victor Julien 44b7d5551a luajit: fix crash if luaL_newstate fails 13 years ago
Victor Julien b29971bc92 luajit: buffer selection fixes 13 years ago
Victor Julien fcc21ae4cc http: fix multipart parsing bug 13 years ago
Victor Julien 8f337a3904 stream: never resend reassembled data to app layer. 13 years ago
Victor Julien 9a4b612126 app layer events: prefilter sigs that need an event 13 years ago
Victor Julien 575c87aeba engine events: prefilter sigs that need a event 13 years ago
Eric Leblond 5f12b23469 af-packet: little code cleaning
This patch cleans the code were two almost identical treatment on
the packet we're made. It may be linked by a merge error I've done
or to a simple mistake on my side.
13 years ago
Eric Leblond 0581a23f3c af-packet: fix IPS mode
There was an inversion in code resulting as all sockets being seen
as non IPS mode when doing the peering. This resulted in a crash at
first packet because it has no peer.
13 years ago
Eric Leblond 566674ae4a Fix logic operator.
Previous patches on the same subject did not fixed this error as it
was undetected because the code was not compiled on my setup.
13 years ago
Victor Julien 7a044a99ee Defrag engine
Big rewrite of defrag engine to make it more scalable and fix some
locking logic flaws.

Now uses a hash of trackers similar to Flow and Host hashes.
13 years ago
Victor Julien c91c359692 profiling: fix build on older systems 13 years ago
Eric Leblond 794bfc590c autotools: fix doc install on old systems. 13 years ago