]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
12 years agoaf-packet: fix build on systems without AF_PACKET
Eric Leblond [Mon, 3 Sep 2012 14:57:21 +0000 (16:57 +0200)] 
af-packet: fix build on systems without AF_PACKET

12 years agodoxygen: generate doc for acquisition modules
Eric Leblond [Thu, 30 Aug 2012 07:54:53 +0000 (09:54 +0200)] 
doxygen: generate doc for acquisition modules

This patch sets some define to generate doc for the acquisition
modules. It also suppress the doc generation for unittests which
was polluting the output.

12 years agopool: update doxygen documentation.
Eric Leblond [Thu, 30 Aug 2012 07:54:34 +0000 (09:54 +0200)] 
pool: update doxygen documentation.

12 years agopool: realize a block allocation for preallocated item.
Eric Leblond [Wed, 29 Aug 2012 10:27:26 +0000 (12:27 +0200)] 
pool: realize a block allocation for preallocated item.

This patch required a evolution of Pool API as it is needed to
proceed to alloc or init separetely. The PoolInit has been changed
with a new Init function parameter.

12 years agopool: alloc a single area for all PoolBuckets
Eric Leblond [Thu, 26 Jul 2012 13:02:20 +0000 (15:02 +0200)] 
pool: alloc a single area for all PoolBuckets

As we know the number and the size of PoolBucket, we can simply
allocate a single memory zone.

12 years agol3proto: add unit tests
Eric Leblond [Wed, 22 Aug 2012 13:39:27 +0000 (15:39 +0200)] 
l3proto: add unit tests

This patch adds a series of unit tests. First two check test the keyword
by checking packet on signatures using it. Last one adds is here to check
that there is no interaction of l3_proto and ip_proto.

12 years agosig: add l3_proto keyword
Eric Leblond [Fri, 13 Jul 2012 13:46:02 +0000 (15:46 +0200)] 
sig: add l3_proto keyword

This patch adds a l3_proto keyword to the signature language. It
can be used to specify if the signature has to match on IPv4, IPv6
or both. For example, one can write:
  alert http any any -> any 22 (msg: "HTTP v6"; l3_proto:ip6; sid:14;)

This should close #494.

12 years agosig: Add ipv6 and ipv4 to list of protocols
Eric Leblond [Fri, 13 Jul 2012 13:44:31 +0000 (15:44 +0200)] 
sig: Add ipv6 and ipv4 to list of protocols

With this patch it is possible to do:
 alert ipv6 any any -> any any
or
 alert ip4 any any -> any any
to match on IPv4 or IPv6 packets.

12 years agoaf-packet: detect MTU mismatch and warn user
Eric Leblond [Tue, 14 Aug 2012 07:49:07 +0000 (09:49 +0200)] 
af-packet: detect MTU mismatch and warn user

If the MTU on the reception interface and the one on the transmission
interface are different, this will result in an error at transmission
when sending packet to the wire.

12 years agoaf-packet: add optional emergency mode
Eric Leblond [Fri, 27 Jul 2012 09:48:10 +0000 (11:48 +0200)] 
af-packet: add optional emergency mode

Flush all waiting packets to be in sync with kernel when drop
occurs. This mode can be activated by setting use-emergency-flush
to yes in the interface configuration.

12 years agoaf-packet: reorder socket operation.
Eric Leblond [Mon, 30 Jul 2012 10:12:34 +0000 (12:12 +0200)] 
af-packet: reorder socket operation.

This patch moves raw socket binding at the end of init code to
avoid to have a flow of packets reaching the socket before we
start to read them.

The socket creation is now made in the loop function to avoid
any timing issue between init function and the call of the loop.

12 years agoaf-packet: fix runmode name in logging function
Eric Leblond [Fri, 20 Jul 2012 19:11:23 +0000 (21:11 +0200)] 
af-packet: fix runmode name in logging function

12 years agoaf-packet: add doxygen comments
Eric Leblond [Mon, 3 Sep 2012 12:57:44 +0000 (14:57 +0200)] 
af-packet: add doxygen comments

This patch adds doxygen comments to newly introduced function and adds
module AF_PACKET doxygen module with a dedicated AFP peers module.

12 years agoaf-packet: IPS and TAP feature
Eric Leblond [Thu, 19 Jul 2012 18:07:05 +0000 (20:07 +0200)] 
af-packet: IPS and TAP feature

This patch adds a new feature to AF_PACKET capture mode. It is now
possible to use AF_PACKET in IPS and TAP mode: all traffic received
on a interface will be forwarded (at the Ethernet level) to an other
interface. To do so, Suricata create a raw socket and sends the receive
packets to a interface designed in the configuration file.

This patch adds two variables to the configuration of af-packet
interface:
 copy-mode: ips or tap
 copy-iface: eth1 #the interface where packet are copied
If copy-mode is set to ips then the packet wth action DROP are not
copied to the destination interface. If copy-mode is set to tap,
all packets are copied to the destination interface.
Any other value of copy-mode results in the feature to be unused.
There is no default interface for copy-iface and the variable has
to be set for the ids or tap mode to work.

For now, this feature depends of the release data system. This
implies you need to activate the ring mode and zero copy. Basically
use-mmap has to be set to yes.

This patch adds a peering of AF_PACKET sockets from the thread on
one interface to the threads on another interface. Peering is
necessary as if we use an other socket the capture socket receives
all emitted packets. This is made using a new AFPPeer structure to
avoid direct interaction between AFPTreadVars.

There is currently a bug in Linux kernel (prior to 3.6) and it is
not possible to use multiple threads.

You need to setup two interfaces with equality on the threads
variable. copy-mode variable must be set on the two interfaces
and use-mmap must be set to activated.

A valid configuration for an IPS using eth0 and vboxnet1 interfaces
will look like:

af-packet:
  - interface: eth0
    threads: 1
    defrag: yes
    cluster-type: cluster_flow
    cluster-id: 98
    copy-mode: ips
    copy-iface: vboxnet1
    buffer-size: 64535
    use-mmap: yes
  - interface: vboxnet1
    threads: 1
    cluster-id: 97
    defrag: yes
    cluster-type: cluster_flow
    copy-mode: ips
    copy-iface: eth0
    buffer-size: 64535
    use-mmap: yes

12 years agocapture: add data release mechanism
Eric Leblond [Fri, 15 Jun 2012 15:18:57 +0000 (17:18 +0200)] 
capture: add data release mechanism

This patch adds a data release mechanism. If the capture module
has a call to indicate that userland has finished with the data,
it is possible to use this system. The data will then be released
when the treatment of the packet is finished.

To do so the Packet structure has been modified:
+    TmEcode (*ReleaseData)(ThreadVars *, struct Packet_ *);
If ReleaseData is null, the function is called when the treatment
of the Packet is finished.
Thus it is sufficient for the capture module to code a function
wrapping the data release mechanism and to assign it to ReleaseData
field.

This patch also includes an implementation of this mechanism for
AF_PACKET.

12 years agoaf-packet: improve mmaped running mode.
Eric Leblond [Thu, 5 Jul 2012 05:41:16 +0000 (07:41 +0200)] 
af-packet: improve mmaped running mode.

The mmaped mode was using a too small ring buffer size which was
not able to handle burst of packets coming from the network. This
may explain the important packet loss rate observed by Edward
Fjellskål.
This patch increases the default value and adds a ring-size
variable which can be used to manually tune the value.

12 years agoaf-packet: delete design comments
Eric Leblond [Fri, 20 Jul 2012 07:41:52 +0000 (09:41 +0200)] 
af-packet: delete design comments

12 years agoMake sure we never underflow len in DetectLoadSigFile
Victor Julien [Mon, 3 Sep 2012 09:30:19 +0000 (11:30 +0200)] 
Make sure we never underflow len in DetectLoadSigFile

12 years agoAdd counters for IPv4 in IPv6 and IPv6 in IPv6 45/head
Eric Leblond [Mon, 3 Sep 2012 08:04:43 +0000 (10:04 +0200)] 
Add counters for IPv4 in IPv6 and IPv6 in IPv6

12 years agofile: convert filesize to new FileMatch api.
Victor Julien [Thu, 30 Aug 2012 15:17:28 +0000 (17:17 +0200)] 
file: convert filesize to new FileMatch api.

12 years agostream/app layer: call new Truncate callback for data gap case as well.
Victor Julien [Thu, 30 Aug 2012 14:50:16 +0000 (16:50 +0200)] 
stream/app layer: call new Truncate callback for data gap case as well.

12 years agostream/app layer: add Truncate app layer callback that is called if stream depth...
Victor Julien [Thu, 30 Aug 2012 14:44:36 +0000 (16:44 +0200)] 
stream/app layer: add Truncate app layer callback that is called if stream depth is reached. Use it to trunc open files in HTTP.

12 years agofile: implement filesize keyword. #489.
Victor Julien [Thu, 30 Aug 2012 08:02:02 +0000 (10:02 +0200)] 
file: implement filesize keyword. #489.

12 years agodetection engine port api unittests cleanup
Anoop Saldanha [Wed, 29 Aug 2012 09:47:59 +0000 (15:17 +0530)] 
detection engine port api unittests cleanup

12 years agoCreate separate detect API call (FileMatch) for file detection keywords. #531.
Victor Julien [Wed, 29 Aug 2012 08:01:34 +0000 (10:01 +0200)] 
Create separate detect API call (FileMatch) for file detection keywords. #531.

12 years agotls-log: add protocol version to log message. 43/head
Eric Leblond [Tue, 28 Aug 2012 11:24:20 +0000 (13:24 +0200)] 
tls-log: add protocol version to log message.

12 years agofix regression (clobbered register; redmine #534)
pi-rho [Tue, 28 Aug 2012 00:20:58 +0000 (19:20 -0500)] 
fix regression (clobbered register; redmine #534)

12 years agospelling corrections documented in redmine bug#533 40/head
pi-rho [Tue, 28 Aug 2012 00:13:50 +0000 (19:13 -0500)] 
spelling corrections documented in redmine bug#533

12 years agorule reloads: don't lock up main thread so clean shutdown is impossible
Victor Julien [Mon, 27 Aug 2012 15:35:46 +0000 (17:35 +0200)] 
rule reloads: don't lock up main thread so clean shutdown is impossible

12 years agopcap: fix compilation on old libpcap
Victor Julien [Mon, 27 Aug 2012 14:49:58 +0000 (16:49 +0200)] 
pcap: fix compilation on old libpcap

12 years agotm-thread: suppress rarely used variable. 39/head
Eric Leblond [Mon, 27 Aug 2012 13:18:33 +0000 (15:18 +0200)] 
tm-thread: suppress rarely used variable.

12 years agoConvert to atomic and disable check on HTP config change.
Eric Leblond [Wed, 15 Aug 2012 15:28:00 +0000 (17:28 +0200)] 
Convert to atomic and disable check on HTP config change.

This patch converts the series of variable to an atomic.

Furthermore, as the callbacks are now always run, it is not
necessary anymore to refuse a ruleswap if HTP parameters are
changing.

12 years agoGet rid of AppLayerHtpRegisterExtraCallbacks
Eric Leblond [Wed, 15 Aug 2012 12:04:03 +0000 (14:04 +0200)] 
Get rid of AppLayerHtpRegisterExtraCallbacks

This patch add a early exit condition to the body handling callback.
This permits to avoid to avoid a complex system to handle htp
object change.

12 years agoDelay Detect threads initialization
Eric Leblond [Fri, 10 Aug 2012 13:32:30 +0000 (15:32 +0200)] 
Delay Detect threads initialization

This patch modifies the init of Detect threads. They are now started
with a dummy function and their initialisation is done after the
signatures are loaded. Just after this, the dummy function is switched
to normal one.

In IPS mode, this permit to route packets without waiting for the
signature to start and should fix #488.

Offline mode such as pcap file don't use this mode to be sure to
analyse all packets in the file.

The patch introduces a "delayed-detect" configuration variable
under detect-engine. It can be used to activate the feature
(set to "yes" to have signature loaded after capture is started).

12 years agopcap: handle failure of packet treatment
Eric Leblond [Sat, 11 Aug 2012 09:43:18 +0000 (11:43 +0200)] 
pcap: handle failure of packet treatment

If the loop is breaked, this means we've got a treatment error. We
don't need to reconnect but we must exit with correct status.

12 years agotls: suppress always true condition. 34/head
Eric Leblond [Thu, 23 Aug 2012 15:06:39 +0000 (17:06 +0200)] 
tls: suppress always true condition.

12 years agodetect-tls: various indent fixes.
Eric Leblond [Tue, 21 Aug 2012 13:42:10 +0000 (15:42 +0200)] 
detect-tls: various indent fixes.

And delete a useless FIXME.

12 years agotls: store all the certificates chain in the written PEM file.
Eric Leblond [Thu, 23 Aug 2012 07:25:15 +0000 (09:25 +0200)] 
tls: store all the certificates chain in the written PEM file.

When using the tls.store command, a dump of all certificates in
the chain is now done on the disk.

12 years agotls: keep pointers to all certificates in chain
Eric Leblond [Wed, 18 Jul 2012 13:13:49 +0000 (15:13 +0200)] 
tls: keep pointers to all certificates in chain

When multiple certificates forming a chain are sent. A pointer to
the start of each certificate is kept. This will allow treatment
on certificates chains.

12 years agotls: adding store option for TLS
Jean-Paul Roliers [Sat, 4 Feb 2012 16:37:41 +0000 (17:37 +0100)] 
tls: adding store option for TLS

This patch adds a TLS store option to save certificate in PEM format.
Each time the store action is met, a file and a metafile are created.

Reworked-by: Eric Leblond <eric@regit.org>
12 years agotls: adding support for fingerprint rule matching.
Jean-Paul Roliers [Thu, 2 Feb 2012 15:45:35 +0000 (16:45 +0100)] 
tls: adding support for fingerprint rule matching.

Add the support for tls.fingerprint keyword in rules.

12 years agotls: adding fingerprint to TLS Log information.
Jean-Paul Roliers [Sat, 4 Feb 2012 16:15:11 +0000 (17:15 +0100)] 
tls: adding fingerprint to TLS Log information.

Improve TLS logging by adding the certificate fingerprint to TLS Log file.
Add the extending option to the tls-log entry in suricata.yaml.

12 years agotls: adding fingerprint calculation.
Jean-Paul Roliers [Thu, 2 Feb 2012 14:07:42 +0000 (15:07 +0100)] 
tls: adding fingerprint calculation.

Adding a pointer in ssl_state struct and compute fingerprint during
certificate decoding.

12 years agotls: add NSS version for SHA1 computing function.
Eric Leblond [Thu, 5 Apr 2012 14:45:24 +0000 (16:45 +0200)] 
tls: add NSS version for SHA1 computing function.

12 years agotls: adding cryptographic functions.
Jean-Paul Roliers [Thu, 2 Feb 2012 13:51:31 +0000 (14:51 +0100)] 
tls: adding cryptographic functions.

Adding util-crypt containing cryptographic functions as SHA1 and Base64.

12 years agotls: adding TLS Log support
Jean-Paul Roliers [Wed, 1 Feb 2012 21:36:44 +0000 (22:36 +0100)] 
tls: adding TLS Log support

Creation of the log-tlslog file in order to log tls message.
Need to add some information into suricata.yaml to work.

  - tls-log:
      enabled: yes # Log TLS connections.
      filename: tls.log # File to store TLS logs.

12 years agoDon't wait for packetpool to be back to full state before continuing with the shutdow...
Anoop Saldanha [Thu, 19 Jul 2012 06:26:16 +0000 (11:56 +0530)] 
Don't wait for packetpool to be back to full state before continuing with the shutdown process, on received shutdown signal

12 years agoSuricata shutdown updates + minor cleanup
Anoop Saldanha [Thu, 19 Jul 2012 05:30:42 +0000 (11:00 +0530)] 
Suricata shutdown updates + minor cleanup

12 years agorx TMs shouldn't return TM_ECODE_FAILED if engine is in shutdown mode + minor cleanup
Anoop Saldanha [Sun, 15 Jul 2012 08:21:14 +0000 (13:51 +0530)] 
rx TMs shouldn't return TM_ECODE_FAILED if engine is in shutdown mode + minor cleanup

12 years agoCustom logging feature for log-httplog
Ignacio Sanchez [Wed, 22 Aug 2012 15:38:32 +0000 (16:38 +0100)] 
Custom logging feature for log-httplog

12 years agodecode: decode IPv6-in-IPv6
Eric Leblond [Wed, 8 Aug 2012 14:21:27 +0000 (16:21 +0200)] 
decode: decode IPv6-in-IPv6

This patch adds decoding of IPv6-in-IPv6. It also adds some events
for invalid packets.

This patch should fix #514.

12 years agoUpdate version number to reflect we're working towards 1.4 now.
Victor Julien [Thu, 23 Aug 2012 06:41:45 +0000 (08:41 +0200)] 
Update version number to reflect we're working towards 1.4 now.

12 years agoAdd teredo counter.
Eric Leblond [Wed, 22 Aug 2012 10:40:01 +0000 (12:40 +0200)] 
Add teredo counter.

12 years agodefrag: prealloc more frags. 27/head
Eric Leblond [Fri, 27 Jul 2012 07:25:45 +0000 (09:25 +0200)] 
defrag: prealloc more frags.

12 years agodefrag: Fix description of params
Eric Leblond [Fri, 27 Jul 2012 07:25:27 +0000 (09:25 +0200)] 
defrag: Fix description of params

The max-frags params is not what it is.

12 years agodefrag: add some events relative to defragmentation
Eric Leblond [Thu, 26 Jul 2012 19:27:29 +0000 (21:27 +0200)] 
defrag: add some events relative to defragmentation

12 years agodefrag: Fix unittest logic.
Eric Leblond [Wed, 22 Aug 2012 12:24:30 +0000 (14:24 +0200)] 
defrag: Fix unittest logic.

We've linked the size of hash with trackers. Thus calling DefragInit()
after setting the configuration variable is more logic.

12 years agodefrag: link hash size with number of frags.
Eric Leblond [Thu, 26 Jul 2012 16:29:51 +0000 (18:29 +0200)] 
defrag: link hash size with number of frags.

We set defrag_hash_size by using the number of trackers. This is
effective to avoid collision.

12 years agodefrag: fix some integer type warning.
Eric Leblond [Thu, 26 Jul 2012 15:03:30 +0000 (17:03 +0200)] 
defrag: fix some integer type warning.

12 years agodefrag: really use 'max-frags' variable.
Eric Leblond [Tue, 24 Jul 2012 12:14:43 +0000 (14:14 +0200)] 
defrag: really use 'max-frags' variable.

The 'max-frags' variable was not used and the 'trackers' variable was
not documented. This patch fixes the two issues.

12 years agoTeredo tunnel supports 25/head
Eric Leblond [Mon, 16 Jul 2012 10:16:37 +0000 (12:16 +0200)] 
Teredo tunnel supports

This patch should fix #480 by adding the support of Teredo tunnel.
The IPv6 content of the tunnel will be parsed in a similar way as
what is done the GRE tunnel. Signatures will then be matched on the
IPv6 content.

12 years agoAdd support for IPv4-in-IPv6 23/head
Eric Leblond [Mon, 16 Jul 2012 14:11:40 +0000 (16:11 +0200)] 
Add support for IPv4-in-IPv6

This patch adds support for IPv4-in-IPv6 and should fix #462.

12 years agonfq: implement "fail-open" support.
Eric Leblond [Tue, 7 Aug 2012 16:20:13 +0000 (18:20 +0200)] 
nfq: implement "fail-open" support.

On linux >= 3.6, you can use the fail-open option on a NFQ queue
to have the kernel accept the packet if userspace is not able to keep
pace.

Please note that the kernel will not trigger an error if the feature is activated
in userspace libraries but not available in kernel.

This patch implements the option for suricata by adding a nfq.fail-open
configuration variable which is desactivated by default.

12 years agoyaml: suppress old variable in pfring section.
Eric Leblond [Thu, 5 Jul 2012 20:38:00 +0000 (22:38 +0200)] 
yaml: suppress old variable in pfring section.

12 years agoautotools: error on autoreconf is an error
Eric Leblond [Thu, 5 Jul 2012 21:24:38 +0000 (23:24 +0200)] 
autotools: error on autoreconf is an error

12 years agoautotools: fix detection with clang
Eric Leblond [Tue, 31 Jul 2012 12:37:37 +0000 (14:37 +0200)] 
autotools: fix detection with clang

This patch improve detection of type of nfq_get_payload() by only
converting to error the warning we have when using the wrong type.

12 years agoautotools: rename configure.in to configure.ac
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

12 years agotm-thread: exit loop if suri want to quit 19/head
Eric Leblond [Thu, 9 Aug 2012 14:47:52 +0000 (16:47 +0200)] 
tm-thread: exit loop if suri want to quit

12 years agotm-thread: run thread init function sequentially.
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.

12 years agoUpdate Changelog to include 1.3.1 changes. suricata-1.3.1
Victor Julien [Mon, 20 Aug 2012 12:23:19 +0000 (14:23 +0200)] 
Update Changelog to include 1.3.1 changes.

12 years agorule analyzer: make analyzer aware of http_user_agent pcre flag /V.
Victor Julien [Mon, 20 Aug 2012 06:54:45 +0000 (08:54 +0200)] 
rule analyzer: make analyzer aware of http_user_agent pcre flag /V.

12 years agohttp: after path double decoding, also normalize the path again. #504.
Victor Julien [Fri, 17 Aug 2012 15:23:39 +0000 (17:23 +0200)] 
http: after path double decoding, also normalize the path again. #504.

12 years agoHttp: don't double decode URI path and query by default. Instead add per server optio...
Victor Julien [Fri, 17 Aug 2012 11:37:40 +0000 (13:37 +0200)] 
Http: don't double decode URI path and query by default. Instead add per server options to enable double decoding for both cases. #464 #504.

12 years agoOnly set SIG_FLAG_REQUIRE_STREAM if signature inspects TCP.
Victor Julien [Fri, 17 Aug 2012 09:07:48 +0000 (11:07 +0200)] 
Only set SIG_FLAG_REQUIRE_STREAM if signature inspects TCP.

12 years agorule analyzer: fix fast pattern analyzer reporting wrong filename (same as rule analy...
Victor Julien [Fri, 17 Aug 2012 08:43:45 +0000 (10:43 +0200)] 
rule analyzer: fix fast pattern analyzer reporting wrong filename (same as rule analyzer).

12 years agostream-tcp: no checksum alert if validation is off
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.

12 years agostream: handle case where Suricata sees 3whs-ACK but server doesn't. Bug #523.
Victor Julien [Thu, 16 Aug 2012 10:41:53 +0000 (12:41 +0200)] 
stream: handle case where Suricata sees 3whs-ACK but server doesn't. Bug #523.

12 years agostream: fix unittest broken by new flags handling.
Victor Julien [Wed, 15 Aug 2012 15:13:33 +0000 (17:13 +0200)] 
stream: fix unittest broken by new flags handling.

13 years agohttp: add more decoding unittests.
Victor Julien [Tue, 14 Aug 2012 11:49:13 +0000 (13:49 +0200)] 
http: add more decoding unittests.

13 years agoBug #510. Produce error if max-pending-packets is higher than 65534. origin/HEAD origin/master
Victor Julien [Thu, 9 Aug 2012 14:59:49 +0000 (16:59 +0200)] 
Bug #510. Produce error if max-pending-packets is higher than 65534.

13 years agoprofiling: fix 'match' counter sometimes not incrementing. #460.
Victor Julien [Thu, 9 Aug 2012 14:07:41 +0000 (16:07 +0200)] 
profiling: fix 'match' counter sometimes not incrementing. #460.

13 years agoUse SCFree instead of free in DER decoder.
Victor Julien [Thu, 9 Aug 2012 14:02:04 +0000 (16:02 +0200)] 
Use SCFree instead of free in DER decoder.

13 years agostream: improve TCP flags handling
Victor Julien [Wed, 8 Aug 2012 12:29:31 +0000 (14:29 +0200)] 
stream: improve TCP flags handling

13 years agoaf-packet: fix reconnect code
Eric Leblond [Mon, 30 Jul 2012 10:11:23 +0000 (12:11 +0200)] 
af-packet: fix reconnect code

Reconnect code was in a "work by luck" stage as we did not update
the socket number after reconnect.

13 years agoUpdate fast_pattern engine to not use negated content as fast_pattern if we have...
Anoop Saldanha [Wed, 1 Aug 2012 15:30:11 +0000 (21:00 +0530)] 
Update fast_pattern engine to not use negated content as fast_pattern if we have non-negated content in the sig.

Noticing a good spike in perf with et_pro ruleset.

Thanks to Will Metcalf for the suggestion.

13 years agobug #466 - Updated getticks() to serialize execution of rdtsc with cpuid
Anoop Saldanha [Mon, 9 Jul 2012 04:31:54 +0000 (10:01 +0530)] 
bug #466 - Updated getticks() to serialize execution of rdtsc with cpuid

13 years agobug 508 - List (ack | cwr | ecn) combination to be accepted by our stream engine.
Anoop Saldanha [Thu, 19 Jul 2012 08:02:01 +0000 (13:32 +0530)] 
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.

13 years agoinvalidate sigs if depth > content_length
Anoop Saldanha [Wed, 11 Jul 2012 14:39:24 +0000 (20:09 +0530)] 
invalidate sigs if depth > content_length

13 years agotls: fix keyword regular expression
Eric Leblond [Wed, 1 Aug 2012 09:04:37 +0000 (11:04 +0200)] 
tls: fix keyword regular expression

Space, dash and comma are valid.

13 years agoaf-packet: loop on ring if there is data to read.
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.

13 years agodefrag: use IP ID in hash
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.

13 years agoflow: remove unused prune-flows option
Victor Julien [Mon, 6 Aug 2012 13:44:59 +0000 (15:44 +0200)] 
flow: remove unused prune-flows option

13 years agoif a sig's set as stream sig only, don't updated it as both stream and pkt sig if...
Anoop Saldanha [Sat, 7 Jul 2012 06:22:20 +0000 (11:52 +0530)] 
if a sig's set as stream sig only, don't updated it as both stream and pkt sig if offset/depth's present

bug #495 - update rule analyzer to not warn on offset_depth-tcp_pkt update if sig is stream only

bug #497 - rule_warnings fixed

13 years agoSet thread name Suricata-Main for main thread and LiveRuleSwap for live swap thread
Anoop Saldanha [Sat, 7 Jul 2012 16:39:06 +0000 (22:09 +0530)] 
Set thread name Suricata-Main for main thread and LiveRuleSwap for live swap thread

13 years agobug 499 - update host os info enum map to use - instead of _ + add new unittests
Anoop Saldanha [Wed, 11 Jul 2012 10:03:38 +0000 (15:33 +0530)] 
bug 499 - update host os info enum map to use - instead of _ + add new unittests

13 years agobug #496 - don't warn about offset/depth for packet sigs
Anoop Saldanha [Fri, 6 Jul 2012 10:44:17 +0000 (16:14 +0530)] 
bug #496 - don't warn about offset/depth for packet sigs

13 years agoWindows build and other misc fixes.
Victor Julien [Wed, 11 Jul 2012 10:47:34 +0000 (12:47 +0200)] 
Windows build and other misc fixes.

13 years agoUpdate changelog for 1.3 release. suricata-1.3
Victor Julien [Fri, 6 Jul 2012 12:52:43 +0000 (14:52 +0200)] 
Update changelog for 1.3 release.

13 years agoRename 'worker' running mode to 'workers'
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.

13 years agocheck if all packets are processed before disabling detect threads + kill all threads...
Anoop Saldanha [Thu, 5 Jul 2012 12:08:58 +0000 (17:38 +0530)] 
check if all packets are processed before disabling detect threads + kill all threads <= detect after FFR + other minor fixes