]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
13 years agonapatech: treat malloc error 190/head
Eric Leblond [Fri, 9 Nov 2012 15:18:35 +0000 (16:18 +0100)] 
napatech: treat malloc error

13 years agococcinelle: improve run_check
Eric Leblond [Fri, 9 Nov 2012 14:57:52 +0000 (15:57 +0100)] 
coccinelle: improve run_check

This patch adds two features to run_check.sh, it is now posssible
to specify a list of files to check:
 ./run_check.sh ../../src/suricata.c ../../src/detect.c
It is also possible to ask a review of the files modified by a commit.
To so simply put the SHA1 as argument
 ./run_check.sh HEAD
 ./run_check 6af7d5f
It is also possible to check all the files for an arbitrary range:
 ./run_check.sh origin/master..buildbot-fixes

Last improvement of this patch is to get a real error message in case
of problem as 2 is not redirected anymore to /dev/null.

13 years agococcinelle: add new correct case to error treatment
Eric Leblond [Thu, 8 Nov 2012 23:09:06 +0000 (00:09 +0100)] 
coccinelle: add new correct case to error treatment

13 years agosuricata: add daemon-directory config variable
Eric Leblond [Fri, 5 Oct 2012 07:46:18 +0000 (09:46 +0200)] 
suricata: add daemon-directory config variable

It is now possible to use the 'daemon-directory' configuration
variable to specify the working directory of suricata in daemon
mode. This will permit to specify the place for core and other
related files.

13 years agosuricata: avoid concurrent run in daemon mode
Eric Leblond [Fri, 5 Oct 2012 07:35:48 +0000 (09:35 +0200)] 
suricata: avoid concurrent run in daemon mode

This patch creates a pid file per default and use it to avoid to be
able to run two Suricata. Separate pid file have to be provided to
be able to do it.

13 years agosuricata: change dir to / in daemon mode.
Eric Leblond [Fri, 5 Oct 2012 06:26:16 +0000 (08:26 +0200)] 
suricata: change dir to / in daemon mode.

By changing directory to /, we will not block the directory where
suricata has been started.

13 years agoRefactor Napatech 3GD to just Napatech as Suricata is only going to support 3GD.
Matt Keeler [Thu, 8 Nov 2012 16:48:17 +0000 (11:48 -0500)] 
Refactor Napatech 3GD to just Napatech as Suricata is only going to support 3GD.

Signed-off-by: Matt Keeler <mk@npulsetech.com>
13 years agoRemove Napatech 2GD support
Matt Keeler [Thu, 8 Nov 2012 16:28:11 +0000 (11:28 -0500)] 
Remove Napatech 2GD support

Removed the Napatech 2GD support

runmode-napatech-3gd.c had an include from runmode-napatech.h which was erroneous and has been removed as well.

Signed-off-by: Matt Keeler <mk@npulsetech.com>
13 years agoconfigure: fix small typo. 187/head
Eric Leblond [Thu, 8 Nov 2012 22:47:27 +0000 (23:47 +0100)] 
configure: fix small typo.

13 years agoconfigure: improve march=native detection
Eric Leblond [Thu, 8 Nov 2012 22:39:20 +0000 (23:39 +0100)] 
configure: improve march=native detection

clang is supposed to support march=native but if the CPU is too
recent for clang, this can cause an invalid detection of arch and
result in a incapability of clang to compile any binary.
This patch updates the test to try a compilation with march=native
when clang is the used compiler.

13 years agoconfigure: differentiate gcc and clang options
Eric Leblond [Thu, 8 Nov 2012 21:09:22 +0000 (22:09 +0100)] 
configure: differentiate gcc and clang options

The version checking was made similarly for clang and gcc. This
patch modifies this to check on compiler name. This way we can
avoid to set march=native which is not supported by clang on
some system.
At the same time, this fix the annoying warning about no-fp-tree
being unsupported by clang.

13 years agoRemove unnecessary debug message
Victor Julien [Thu, 8 Nov 2012 13:03:35 +0000 (14:03 +0100)] 
Remove unnecessary debug message

13 years agoOpenBSD 5.2 build fixes, Unit test fix.
Victor Julien [Thu, 8 Nov 2012 08:47:02 +0000 (09:47 +0100)] 
OpenBSD 5.2 build fixes, Unit test fix.

13 years agosuricata: add run-as.user and run-as.group yaml var
Eric Leblond [Tue, 6 Nov 2012 13:35:07 +0000 (14:35 +0100)] 
suricata: add run-as.user and run-as.group yaml var

This patch update the YAML to be able to specify the user or the
group to run Suricata as:
 run-as:
   user: suri
   group: suri

13 years agopcap: ref config according to threads count
Eric Leblond [Mon, 5 Nov 2012 21:08:40 +0000 (22:08 +0100)] 
pcap: ref config according to threads count

13 years agoyaml: document the threads setting in pcap section.
Eric Leblond [Mon, 5 Nov 2012 19:26:32 +0000 (20:26 +0100)] 
yaml: document the threads setting in pcap section.

13 years agoSilence compiler warning if napatech3 support is disabled
Victor Julien [Wed, 7 Nov 2012 09:34:20 +0000 (10:34 +0100)] 
Silence compiler warning if napatech3 support is disabled

13 years agoNapatech 3GD Support 177/head
Matt Keeler [Thu, 4 Oct 2012 16:34:00 +0000 (12:34 -0400)] 
Napatech 3GD Support

For use with Network Cards from Napatech utilizing the 3GD driver/api.

    - Implemented new run modes in runmode-napatech-3gd.*
    - Implemented capture/decode threads in source-napatech-3gd.*
    - Integrated the new run modes and source into the build infrastructure.

    New configure switches
    --enabled-napatech-3gd : Turns on the NT 3GD support
    --with-napatech-3gd-includes : The directory containing the NT 3GD header files
    --with-napatech-3gd-libraries : The directory containing the NT 3GD libraries to link against.

    New CLI switch
    --napatech-3gd : Uses the Napatech 3GD run mode

    Runmodes Supported:
    - auto
    - autofp
    - workers

    Notes:
    - tested with 1 Gbps sustained traffic (no drops)

Signed-off-by: Matt Keeler <mk@npulsetech.com>
13 years agogcc: construct use for warning was too recent.
Eric Leblond [Sat, 3 Nov 2012 09:09:22 +0000 (10:09 +0100)] 
gcc: construct use for warning was too recent.

13 years agofix wrong record hdr len check in ssl parser 172/head
Anoop Saldanha [Sat, 3 Nov 2012 14:40:03 +0000 (20:10 +0530)] 
fix wrong record hdr len check in ssl parser

13 years agoFix GetUsed functions for Host, Flow and Defrag.
Victor Julien [Fri, 2 Nov 2012 16:46:34 +0000 (17:46 +0100)] 
Fix GetUsed functions for Host, Flow and Defrag.

13 years agobuild: error on implicit function declaration
Eric Leblond [Wed, 31 Oct 2012 14:30:38 +0000 (15:30 +0100)] 
build: error on implicit function declaration

This patch modifies gcc options to error in case of implicit
declaration. Bug #612 has shown this kind of bugs can be very
costly.

13 years agoipfw: suppress non loop receive function
Eric Leblond [Fri, 2 Nov 2012 08:06:19 +0000 (09:06 +0100)] 
ipfw: suppress non loop receive function

13 years agonfq: suppress non loop receive function
Eric Leblond [Fri, 2 Nov 2012 08:05:56 +0000 (09:05 +0100)] 
nfq: suppress non loop receive function

13 years agoflow: fix crash when flow engine under extreme stress, and unable to force free any...
Victor Julien [Fri, 2 Nov 2012 08:18:15 +0000 (09:18 +0100)] 
flow: fix crash when flow engine under extreme stress, and unable to force free any existing flow

13 years agolibhtp: harden code against malloc failures. Bug #587.
Victor Julien [Thu, 1 Nov 2012 14:17:50 +0000 (15:17 +0100)] 
libhtp: harden code against malloc failures. Bug #587.

13 years agohttp: don't assume http tx to have header alloc'd. Can happen in OOM conditions....
Victor Julien [Thu, 1 Nov 2012 14:26:47 +0000 (15:26 +0100)] 
http: don't assume http tx to have header alloc'd. Can happen in OOM conditions. Bug #587.

13 years agoDon't use SCStrdup in SCLogMessage as we call it on OOM condition, leading to endless...
Victor Julien [Thu, 1 Nov 2012 14:16:11 +0000 (15:16 +0100)] 
Don't use SCStrdup in SCLogMessage as we call it on OOM condition, leading to endless recursion. SCStrdup failure calling SCLogMessage...

13 years agofilestore: fix logic flag in continued stateful detection
Victor Julien [Wed, 31 Oct 2012 14:51:41 +0000 (15:51 +0100)] 
filestore: fix logic flag in continued stateful detection

13 years agopf-ring: fix build 163/head
Eric Leblond [Wed, 31 Oct 2012 13:36:02 +0000 (14:36 +0100)] 
pf-ring: fix build

13 years agoRemove pcre jit warning. Bug #579.
Victor Julien [Wed, 31 Oct 2012 11:33:07 +0000 (12:33 +0100)] 
Remove pcre jit warning. Bug #579.

13 years agopf_ring: don't set cluster for DNA interface.
Eric Leblond [Mon, 29 Oct 2012 14:31:35 +0000 (15:31 +0100)] 
pf_ring: don't set cluster for DNA interface.

13 years agofeature #558.
Anoop Saldanha [Mon, 15 Oct 2012 19:44:47 +0000 (01:14 +0530)] 
feature #558.

Print FP info in rule analysis + other cleanup.

13 years agoOpenBSD: no support for profiling
Eric Leblond [Wed, 31 Oct 2012 09:05:20 +0000 (10:05 +0100)] 
OpenBSD: no support for profiling

Local thread storage are not available so profiling is not supported.

13 years agoOpenBSD: magic.mc path has changed in OpenBSD 5.1
Eric Leblond [Wed, 31 Oct 2012 08:47:18 +0000 (09:47 +0100)] 
OpenBSD: magic.mc path has changed in OpenBSD 5.1

13 years agofilestore: fix a case where a matching non-filestore sig could trigger the store...
Victor Julien [Wed, 31 Oct 2012 10:22:53 +0000 (11:22 +0100)] 
filestore: fix a case where a matching non-filestore sig could trigger the store of a partially matching filestore sig.

13 years agohttp: fix client and server body sometimes being inspected in wrong order
Victor Julien [Wed, 31 Oct 2012 07:46:52 +0000 (08:46 +0100)] 
http: fix client and server body sometimes being inspected in wrong order

13 years agostream.inline: add 'auto' mode
Eric Leblond [Tue, 30 Oct 2012 06:46:42 +0000 (07:46 +0100)] 
stream.inline: add 'auto' mode

stream.inline YAML configuration variable now support the 'auto' value.
In this case, inline mode is activated for IPS running mode (NFQ and
IPFW) and is deactivated for IDS mode. This patch should fix bug #592.

13 years agoaf-packet: fix possible infinite loop. 154/head
Eric Leblond [Sun, 14 Oct 2012 17:24:22 +0000 (19:24 +0200)] 
af-packet: fix possible infinite loop.

If no packet arrives to a capture thread, it is possible that the
AFPReadLoop() function goes into an infinite loop. This could cause
suricata to hang at exit on non busy system.
This patch adds a counter to detect when Suricata start looping in
the ring to stop when it reaches this point.

13 years agoaf-packet: dump counter every seconds.
Eric Leblond [Sun, 14 Oct 2012 17:01:36 +0000 (19:01 +0200)] 
af-packet: dump counter every seconds.

This patch updates to kernel counters handling to be almost sure to
update at least once per second.

13 years agopf-ring: add counter for kernel drop and packets
Eric Leblond [Sun, 30 Sep 2012 14:20:05 +0000 (16:20 +0200)] 
pf-ring: add counter for kernel drop and packets

This patch adds a counter for kernel drop and packets by using the
same strategy as the one used in af-packet.

13 years agoFix drop (and other actions) not being applied to thresholded packets. Bug #613.
Victor Julien [Tue, 30 Oct 2012 11:58:58 +0000 (12:58 +0100)] 
Fix drop (and other actions) not being applied to thresholded packets. Bug #613.

13 years agochange default mpm to ac. Also default sgh-mpm-context is full.
Anoop Saldanha [Sun, 14 Oct 2012 20:56:13 +0000 (02:26 +0530)] 
change default mpm to ac. Also default sgh-mpm-context is full.

13 years agoBug 585: use per detect thread libmagic ctx
Victor Julien [Thu, 25 Oct 2012 11:39:13 +0000 (13:39 +0200)] 
Bug 585: use per detect thread libmagic ctx

13 years agomagic: add test showing payload resulting in libmagic invalid read as reported by...
Victor Julien [Wed, 24 Oct 2012 15:51:35 +0000 (17:51 +0200)] 
magic: add test showing payload resulting in libmagic invalid read as reported by valgrind.

13 years agofix flow deadlock issue in detection engine state introduced by tx api.
Anoop Saldanha [Sat, 20 Oct 2012 14:31:52 +0000 (20:01 +0530)] 
fix flow deadlock issue in detection engine state introduced by tx api.

Issue discovered by coverity.

13 years agosuricata: list-keywords does not depend on unittest
Eric Leblond [Tue, 23 Oct 2012 08:31:10 +0000 (10:31 +0200)] 
suricata: list-keywords does not depend on unittest

13 years agoluajit: suppress compiler warning
Victor Julien [Tue, 23 Oct 2012 15:10:36 +0000 (17:10 +0200)] 
luajit: suppress compiler warning

13 years agofix segv in hcbd and hsbd buffering.
Anoop Saldanha [Fri, 19 Oct 2012 09:40:14 +0000 (15:10 +0530)] 
fix segv in hcbd and hsbd buffering.

Increase bufffers_list_len, only we open up a space for a new tx.

13 years agounittest to reveal a bug/segv in our hsbd buffering code.
Anoop Saldanha [Sat, 20 Oct 2012 06:02:22 +0000 (11:32 +0530)] 
unittest to reveal a bug/segv in our hsbd buffering code.

13 years agohttp: fix http header reassembly bug causing some headers to be left out of the inspe...
Victor Julien [Fri, 19 Oct 2012 09:44:51 +0000 (11:44 +0200)] 
http: fix http header reassembly bug causing some headers to be left out of the inspected buffer

13 years agohttp: now that htp_state has a cfg reference, use it for body limits
Victor Julien [Wed, 17 Oct 2012 16:24:56 +0000 (18:24 +0200)] 
http: now that htp_state has a cfg reference, use it for body limits

13 years agohttp: allow configuration of request and response body inspection limits. Issue ...
Victor Julien [Wed, 17 Oct 2012 16:15:37 +0000 (18:15 +0200)] 
http: allow configuration of request and response body inspection limits. Issue #560.

13 years agoNew app inspection engine introduced. Moved existing inspecting engines to use it.
Anoop Saldanha [Sun, 14 Oct 2012 20:14:17 +0000 (01:44 +0530)] 
New app inspection engine introduced.  Moved existing inspecting engines to use it.

13 years agoChange all inspect callbacks to accept TV and a tx_id param.
Anoop Saldanha [Sun, 14 Oct 2012 14:16:46 +0000 (19:46 +0530)] 
Change all inspect callbacks to accept TV and a tx_id param.

13 years agoEngine cleanup. Remove all old engine inspection and mpm functions.
Anoop Saldanha [Sun, 14 Oct 2012 10:49:53 +0000 (16:19 +0530)] 
Engine cleanup.  Remove all old engine inspection and mpm functions.

13 years agoupdate client/server/http_header to use a different form of
Anoop Saldanha [Sat, 13 Oct 2012 18:13:20 +0000 (23:43 +0530)] 
update client/server/http_header to use a different form of
buffering/buffer_retrieval.

Now it happens per tx, based on tx id.  Also notice a perf improvement with
this.

13 years agostream: change how retransmissions are handled and detected.
Victor Julien [Wed, 17 Oct 2012 07:25:52 +0000 (09:25 +0200)] 
stream: change how retransmissions are handled and detected.

13 years agostream: fix retransmission on closewait being considered out of window
Victor Julien [Tue, 16 Oct 2012 14:21:00 +0000 (16:21 +0200)] 
stream: fix retransmission on closewait being considered out of window

13 years agostream: detect retransmissions on timewait state
Victor Julien [Tue, 16 Oct 2012 13:53:48 +0000 (15:53 +0200)] 
stream: detect retransmissions on timewait state

13 years agostream: accept ack with next_seq + 1 on last_ack state
Victor Julien [Tue, 16 Oct 2012 13:39:34 +0000 (15:39 +0200)] 
stream: accept ack with next_seq + 1 on last_ack state

13 years agostream: disable retransmission packet before last ack sig as it is fairly common...
Victor Julien [Tue, 16 Oct 2012 13:37:56 +0000 (15:37 +0200)] 
stream: disable retransmission packet before last ack sig as it is fairly common in regular traffic

13 years agostream: detect retransmissions on closewait and finwait2 states
Victor Julien [Tue, 16 Oct 2012 13:27:30 +0000 (15:27 +0200)] 
stream: detect retransmissions on closewait and finwait2 states

13 years agostream: don't flag zero window probe packets as out of window. Bug #604.
Victor Julien [Tue, 16 Oct 2012 12:52:29 +0000 (14:52 +0200)] 
stream: don't flag zero window probe packets as out of window. Bug #604.

13 years agostream: detect keep-alive packets so we don't consider those invalid
Victor Julien [Tue, 16 Oct 2012 12:09:58 +0000 (14:09 +0200)] 
stream: detect keep-alive packets so we don't consider those invalid

13 years agostream: ignore ack value if ack flag is not set. Add stream.pkt_broken_ack event...
Victor Julien [Tue, 16 Oct 2012 11:27:58 +0000 (13:27 +0200)] 
stream: ignore ack value if ack flag is not set. Add stream.pkt_broken_ack event for when ack value is not 0 and ack flag not set.

13 years agostream: handle retransmission of lost data packet on TIME_WAIT state
Victor Julien [Tue, 16 Oct 2012 09:55:36 +0000 (11:55 +0200)] 
stream: handle retransmission of lost data packet on TIME_WAIT state

13 years agostream: go from FIN_WAIT_1 to CLOSING on simultaneous close.
Victor Julien [Tue, 16 Oct 2012 09:14:59 +0000 (11:14 +0200)] 
stream: go from FIN_WAIT_1 to CLOSING on simultaneous close.

13 years agostream: don't reject RST as response to SYN because of ACK
Victor Julien [Tue, 16 Oct 2012 08:50:39 +0000 (10:50 +0200)] 
stream: don't reject RST as response to SYN because of ACK

13 years agostream: add option to match on overlapping data
Victor Julien [Thu, 11 Oct 2012 19:02:56 +0000 (21:02 +0200)] 
stream: add option to match on overlapping data

Set event on overlapping data segments that have different data.

Add stream-events option stream-event:reassembly_overlap_different_data and
add an example rule.

Issue 603.

13 years agolibhtp: don't use internal iterator
Victor Julien [Fri, 12 Oct 2012 14:40:43 +0000 (16:40 +0200)] 
libhtp: don't use internal iterator

It violates thread safety. #601.

Suricata assures thread safety on the flow level for HTTP tracking. Part of the flow is (in case of HTTP) libhtp's htp_connp_t state. At startup the libhtp glue layer, app-layer-htp initializes as many htp_cfg_t instances as there are libhtp server configurations in the yaml. At HTTP session start, we look up the proper htp_cfg_t based on the server ip and pass it to htp_connp_create.  A ptr to the relevant htp_cfg_t is part of the htp_connp_t. The htp_cfg_t contains "hooks". The are registered based on yaml config at init time.

The hooks have lists of type list_t. The list is run with a built in iterator. The iterator is reset at the start of each "hook_run_all". Since multiple flows share the same htp_cfg_t flow A can reset the iterator while flow B is using it. The flow lock has no effect as flows share the htp_cfg_t.

This has been observed in real traffic. hook_response_body_data was run on the same data multiple times, leading to corrupt extracted files.

13 years agoFix/suppress a couple of harmless compiler warnings.
Victor Julien [Tue, 9 Oct 2012 15:22:42 +0000 (17:22 +0200)] 
Fix/suppress a couple of harmless compiler warnings.

13 years agoRemove dead comment about flow reference api duplicate
Anoop Saldanha [Wed, 10 Oct 2012 08:43:36 +0000 (14:13 +0530)] 
Remove dead comment about flow reference api duplicate

13 years agoMove Flow Reference/Dereferene api from flow-util.h to flow.h.
Anoop Saldanha [Fri, 5 Oct 2012 12:22:37 +0000 (17:52 +0530)] 
Move Flow Reference/Dereferene api from flow-util.h to flow.h.

Remove duplicate FlowDeReference from decode.h

13 years agoUpdate suricata to use FlowReference/FlowDeReference for the ones left out
Anoop Saldanha [Fri, 5 Oct 2012 09:37:27 +0000 (15:07 +0530)] 
Update suricata to use FlowReference/FlowDeReference for the ones left out
from last update.

13 years agoyaml: default to cluster_flow type for AF_PACKET and PF_RING
Victor Julien [Tue, 9 Oct 2012 13:16:12 +0000 (15:16 +0200)] 
yaml: default to cluster_flow type for AF_PACKET and PF_RING

13 years agoprofiling: fix rule profiling output sometimes missing sid,rev,gid. Bug #576.
Victor Julien [Mon, 8 Oct 2012 10:38:47 +0000 (12:38 +0200)] 
profiling: fix rule profiling output sometimes missing sid,rev,gid. Bug #576.

13 years agoAdd dsize check to prefilter stage
Victor Julien [Sat, 6 Oct 2012 18:00:22 +0000 (20:00 +0200)] 
Add dsize check to prefilter stage

Many sigs with dsize have a weak fast_pattern. Those patterns
are likely to match. By filtering on dsize early, we safe a lot
of cycles later.

13 years agoFor signatures with the dsize option set depth on any content match in that sig.
Victor Julien [Wed, 18 May 2011 17:07:51 +0000 (19:07 +0200)] 
For signatures with the dsize option set depth on any content match in that sig.

13 years agoUpdate changelog to reflect 1.4beta2 changes suricata-1.4beta2
Victor Julien [Thu, 4 Oct 2012 13:01:36 +0000 (15:01 +0200)] 
Update changelog to reflect 1.4beta2 changes

13 years agoClean up and update bundled docs
Victor Julien [Thu, 4 Oct 2012 12:59:58 +0000 (14:59 +0200)] 
Clean up and update bundled docs

13 years agoremove reference to non-existing file from Makefile.am
Victor Julien [Thu, 4 Oct 2012 12:52:22 +0000 (14:52 +0200)] 
remove reference to non-existing file from Makefile.am

13 years agopacket src: move pkt_src field up in the structure to fix in an existing hole (found...
Victor Julien [Thu, 4 Oct 2012 11:20:27 +0000 (13:20 +0200)] 
packet src: move pkt_src field up in the structure to fix in an existing hole (found with pahole -C Packet_ src/.libs/suricata).

13 years agoAdd a packet src for every packet generated inside suricata.
Anoop Saldanha [Sat, 29 Sep 2012 04:59:56 +0000 (10:29 +0530)] 
Add a packet src for every packet generated inside suricata.

13 years agonfq: fix detection of type nfq_get_payload function.
Eric Leblond [Thu, 4 Oct 2012 09:53:29 +0000 (11:53 +0200)] 
nfq: fix detection of type nfq_get_payload function.

13 years agonfq: close the queue when leaving acquisition.
Eric Leblond [Thu, 4 Oct 2012 09:06:33 +0000 (11:06 +0200)] 
nfq: close the queue when leaving acquisition.

This patch adds a call to close the queue when the acquisition
loop is ending. This way the incoming packets will be accepted
during all the shutdown phase (if the queue-bypass option of
NFQUEUE is used). At the same time the currently processed packets
will be dropped but the time scale are different: suricata will
drop 20 ms of packets and the shutdown can take 0.5 seconds.

Patch based on an idea of Victor Julien.

13 years agofast_pattern: don't consider http_method, http_stat_code and http_stat_msg when autom...
Victor Julien [Thu, 4 Oct 2012 09:48:42 +0000 (11:48 +0200)] 
fast_pattern: don't consider http_method, http_stat_code and http_stat_msg when automatically giving preference to a HTTP pattern over a stream pattern.

13 years agopf-ring: suppress unused variable.
Eric Leblond [Wed, 3 Oct 2012 08:34:09 +0000 (10:34 +0200)] 
pf-ring: suppress unused variable.

13 years agopf-ring: add missing header.
Eric Leblond [Sun, 30 Sep 2012 14:19:53 +0000 (16:19 +0200)] 
pf-ring: add missing header.

13 years agopf-ring: protect definition of (un)likely
Eric Leblond [Sun, 30 Sep 2012 14:18:10 +0000 (16:18 +0200)] 
pf-ring: protect definition of (un)likely

This patch makes (un)likely declared if and only if they are not
declared before.

13 years agofix for bug #574. 118/head
Anoop Saldanha [Thu, 4 Oct 2012 07:29:58 +0000 (12:59 +0530)] 
fix for bug #574.

More of a temporary solution to prevent any possible FPs.  Disable content
inspection bypass for mpm patterns.

13 years agofix for bug #577.
Anoop Saldanha [Tue, 2 Oct 2012 15:43:35 +0000 (21:13 +0530)] 
fix for bug #577.

If a pattern has matched on mpm, don't re-inspect it later, subject to certain
conditions met by the pattern - namely, not negated, right chop, no replacet
attached to it.

13 years agohtp: update version numbers of bundled htp
Victor Julien [Wed, 3 Oct 2012 13:43:43 +0000 (15:43 +0200)] 
htp: update version numbers of bundled htp

13 years agohttp: fix multipart parsing leading to missing chunks of files in file extraction.
Victor Julien [Wed, 3 Oct 2012 09:37:04 +0000 (11:37 +0200)] 
http: fix multipart parsing leading to missing chunks of files in file extraction.

13 years agoMake available custom features of libhtp.
Anoop Saldanha [Wed, 26 Sep 2012 16:48:02 +0000 (22:18 +0530)] 
Make available custom features of libhtp.

The power of libhtp customisation now available to users.

Options available -

path-backslash-separators: yes
path-compress-separators: yes
path-control-char-handling: none
path-convert-utf8: yes
path-decode-separators: yes
path-decode-u-encoding: yes
path-invalid-encoding-handling: preserve_percent
path-invalid-utf8-handling: none
path-nul-encoded-handling: none
path-nul-raw-handling: none
set-path-replacement-char: ?
set-path-unicode-mapping: bestfit

You can use this for your libhtp customisation.  Options explained in our
wiki.

https://redmine.openinfosecfoundation.org/projects/suricata/wiki/Advanced_libhtp_customization

13 years agorefactor htpconfigure()
Anoop Saldanha [Wed, 26 Sep 2012 15:40:15 +0000 (21:10 +0530)] 
refactor htpconfigure()

13 years agobug #572: make sure we use profiling fallback for all architectures except x86_64...
Victor Julien [Tue, 2 Oct 2012 11:56:12 +0000 (13:56 +0200)] 
bug #572: make sure we use profiling fallback for all architectures except x86_64 and i386.

13 years agoFix flow keyword compilation failure.
Victor Julien [Tue, 2 Oct 2012 08:27:12 +0000 (10:27 +0200)] 
Fix flow keyword compilation failure.

13 years agoUpdate all flow referencing to use the new FlowReference and FlowDeReference
Anoop Saldanha [Thu, 27 Sep 2012 12:55:37 +0000 (18:25 +0530)] 
Update all flow referencing to use the new FlowReference and FlowDeReference
macros.

13 years agofix for bug #557.
Anoop Saldanha [Thu, 27 Sep 2012 09:12:49 +0000 (14:42 +0530)] 
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.