Eric Leblond [Tue, 21 Aug 2012 17:12:20 +0000 (19:12 +0200)]
autotools: rename configure.in to configure.ac
configure.in is deprecated since long and will be replaced by
configure.ac. For more information, see:
http://lists.gnu.org/archive/html/automake/2012-08/msg00023.html
Eric Leblond [Thu, 9 Aug 2012 14:24:18 +0000 (16:24 +0200)]
tm-thread: run thread init function sequentially.
On some setup you want to run each thread init function sequentially.
For example, if I use flow_cpu load balancing on AF_PACKET, my target
is to have CPU 0 (first socket in the group) to be link with the
thread 0 in detect cpu set (first thread to be initialised). A good
way to achieve this is to run only one thread init function at a time
to avoid any possible race condition.
Eric Leblond [Thu, 16 Aug 2012 06:57:19 +0000 (08:57 +0200)]
stream-tcp: no checksum alert if validation is off
This patch disables checksum alert if checksum-validation is set
to no in the configuration file. Without this patch, when parsing
a pcap which checksum offloading, it was not possible to get rid
of event caused by checksum validation.
bug 508 - List (ack | cwr | ecn) combination to be accepted by our stream engine.
This isn't a perfect solution. More like we have patched this for the case we
are in tcp's established state. The right solution would be to accept states
based on the presence(using operator OR) of certain flags in the tcp header,
rather than list out all possible flag combinations.
Eric Leblond [Fri, 27 Jul 2012 09:29:37 +0000 (11:29 +0200)]
af-packet: loop on ring if there is data to read.
This patch should bring some improvements by looping on the
ring when there is some data available instead of getting back
to the poll. It also fix recovery in case of drops on the ring
because the poll command will not return correctly in this case.
Eric Leblond [Fri, 27 Jul 2012 09:22:03 +0000 (11:22 +0200)]
defrag: use IP ID in hash
This patch fixes the collision issue observed on an intensive network
trafic. When there is fragmentation it is the case for all data
exchanged between two hosts. Thus using a hash func only involving
IP addresses (and protocol) was leading to a collision for all
exchanges between the hosts. At a larger scale, it was resulting in
a packet loss. By using the IP ID instead of the protocol family, we
introduce a real difference between the trackers.
Eric Leblond [Thu, 5 Jul 2012 14:12:52 +0000 (16:12 +0200)]
Rename 'worker' running mode to 'workers'
This patch renamed the 'worker' running mode into 'workers'. Thus,
there is only one name in Suricata for the same thing. Backward
compatibility is ensured by replacing "worker" by "workers" when
the old name is used. A warning is printed in the log when the old
name is used.
Eric Leblond [Tue, 12 Jun 2012 05:47:03 +0000 (07:47 +0200)]
cleaning: fix warning when building with clang.
clang was issuing some warnings related to unused return in function.
This patch adds some needed error treatment and ignore the rest of the
warnings by adding a cast to void.
Eric Leblond [Wed, 13 Jun 2012 18:42:04 +0000 (20:42 +0200)]
af-packet: use counter for drop and accept
This patch adds counters for kernel drops and accepts to af-packet
capture module. This information are periodically displayed in
stats.log:
capture.kernel_packets | RxAFP1 | 1792
capture.kernel_drops | RxAFP1 | 0
The statistic is fetch via a setsockopt call every 255 packets.
Eric Leblond [Mon, 11 Jun 2012 14:06:13 +0000 (16:06 +0200)]
af-packet: add support for BPF filter.
This patch adds support for BPF in AF_PACKET running
mode. The command line syntax is the same as the one
used of PF_RING.
The method is the same too: The pcap_compile__nopcap()
function is used to build the BPF filter. It is then
injected into the kernel with a setsockopt() call. If
the adding of the BPF fail, suricata exit.
Eric Leblond [Mon, 11 Jun 2012 21:23:32 +0000 (23:23 +0200)]
af-packet: get datalink for each socket creation.
This patch will allow us to use the datalink when computing the filter.
It also fixes a potential issue where an interface data type change
after the interface if going down/up.
Anoop Saldanha [Fri, 22 Jun 2012 18:18:06 +0000 (23:48 +0530)]
free flowvar entries in flow after live rule swap. Sync flowbits entries into packet struct to be used by alert debuglog when alert debuglog is enabled
Victor Julien [Wed, 14 Mar 2012 10:18:43 +0000 (11:18 +0100)]
Simplify flow resetting on de_ctx update. Detect ctx id starts at 1. So in a flow 0 means uninitialized (thus set) and if we detect flow is not equal to detect id, we reset the sgh storage and de_state.
Anoop Saldanha [Fri, 22 Jun 2012 16:21:32 +0000 (21:51 +0530)]
If new ruleset requires any htp callbacks that aren't already set, don't load new ruleset; request user to restart suricata + disable setting fileinsepection flags unconditionally in main
Anoop Saldanha [Fri, 22 Jun 2012 15:38:26 +0000 (21:08 +0530)]
live rule support added
To reload ruleset during engine runtime, send the USR2 signal to the engine, and the ruleset would be reloaded from the same yaml file supplied at engine startup
Anoop Saldanha [Fri, 22 Jun 2012 12:20:15 +0000 (17:50 +0530)]
make mpm ctx container de_ctx specific. Also introduce global variable in mpm_ctx. this is a workaround for cleaning non global mpm_ctx's since we now don't supply the de_ctx around the detection engine API