]> git.ipfire.org Git - people/ms/suricata.git/log
people/ms/suricata.git
8 years agoUpdate changelog for 3.0RC3
Victor Julien [Mon, 21 Dec 2015 13:11:44 +0000 (14:11 +0100)] 
Update changelog for 3.0RC3

8 years agoredis: fix compiler warning
Victor Julien [Sat, 19 Dec 2015 15:27:35 +0000 (16:27 +0100)] 
redis: fix compiler warning

8 years agoprelude: clean up memory on setup failure
Victor Julien [Fri, 18 Dec 2015 10:07:36 +0000 (11:07 +0100)] 
prelude: clean up memory on setup failure

8 years agopcap: fix setup failure memleak on libpcap < 1.0
Victor Julien [Fri, 18 Dec 2015 10:03:40 +0000 (11:03 +0100)] 
pcap: fix setup failure memleak on libpcap < 1.0

8 years agoprelude: style fixup
Victor Julien [Thu, 17 Dec 2015 15:41:05 +0000 (16:41 +0100)] 
prelude: style fixup

8 years agoprelude: fix thread safeness
Eric Leblond [Mon, 7 Dec 2015 11:08:16 +0000 (12:08 +0100)] 
prelude: fix thread safeness

Prelude analyzer is not thread safe so we need to have one
analyzer per thread.

8 years agosuricata: can't use -l and unix socket runmode
Eric Leblond [Mon, 14 Dec 2015 14:18:07 +0000 (15:18 +0100)] 
suricata: can't use -l and unix socket runmode

It is not possible to use simultaneously -l and unix socket
runmode because setting the log directory make it final so
not modifable by other call.

It is a implementation limitation but it does not make sense
to set logging directory to have it overwritten by the first
directory specified 'by pcap-file'. So it seems correct to
only trigger an error if this both options are used at the same
time.

8 years agounix-manager: display errors like errors
Eric Leblond [Mon, 14 Dec 2015 14:04:47 +0000 (15:04 +0100)] 
unix-manager: display errors like errors

Not being able to setup the output directory or file is an error so
it should be printed as such.

8 years agounix-manager: fix race condition
Eric Leblond [Mon, 14 Dec 2015 13:02:20 +0000 (14:02 +0100)] 
unix-manager: fix race condition

Under high load it is possible that the thread is not yet started
and that we register a command at the same time. As a consequence,
the commands list is not yet initialized and we have a segfault.

This patch moves the initialization in the ThreadInit function to
be sure the commands list is available when needed.

8 years agoicmpv4: remove unused header fields
Victor Julien [Wed, 16 Dec 2015 10:02:15 +0000 (11:02 +0100)] 
icmpv4: remove unused header fields

8 years agoicmpv4: remove unused declarations
Victor Julien [Wed, 16 Dec 2015 09:49:50 +0000 (10:49 +0100)] 
icmpv4: remove unused declarations

8 years agoicmpv4: harden embedded packet handling
Victor Julien [Wed, 16 Dec 2015 09:50:50 +0000 (10:50 +0100)] 
icmpv4: harden embedded packet handling

8 years agoicmpv4: improve dest unreachable logic
Victor Julien [Wed, 16 Dec 2015 09:45:05 +0000 (10:45 +0100)] 
icmpv4: improve dest unreachable logic

When a ICMPv4 destination unreachable packet contains an embedded packet
this packet is parsed. When it's found to be invalid, the whole ICMP
packet is tagged as invalid.

In some cases the unreachable packet would still be used.

This patch fixes this by checking the packet is invalid flag as well
in the ICMPV4_DEST_UNREACH_IS_VALID macro.

8 years agoDER decoder: don't use strlcpy on non-strings
Victor Julien [Thu, 17 Dec 2015 12:25:02 +0000 (13:25 +0100)] 
DER decoder: don't use strlcpy on non-strings

8 years agohttp: more sane body inspection/tracking defaults
Victor Julien [Fri, 11 Dec 2015 15:05:42 +0000 (16:05 +0100)] 
http: more sane body inspection/tracking defaults

8 years agohttp: improve body pruning
Victor Julien [Thu, 10 Dec 2015 15:12:05 +0000 (16:12 +0100)] 
http: improve body pruning

In case the body wasn't inspected the body_inspected variable wouldn't
get updated leading to the body not getting pruned at all.

This patch adds support for this case.

8 years agoips/drop-log: fix crash on logging drops
Victor Julien [Thu, 10 Dec 2015 08:58:52 +0000 (09:58 +0100)] 
ips/drop-log: fix crash on logging drops

When logging drops for fragmented UDP packets, triggered by detection
in the reassembled packet, a missing check could lead to access of the
packets UDP header pointer when it was NULL.

8 years agohttp file: fix txid type
Victor Julien [Fri, 13 Nov 2015 09:45:18 +0000 (10:45 +0100)] 
http file: fix txid type

8 years agofile: sync file and tx id types
Victor Julien [Fri, 13 Nov 2015 09:38:21 +0000 (10:38 +0100)] 
file: sync file and tx id types

8 years agosmtp: reset inspection buffers
Victor Julien [Tue, 1 Dec 2015 14:20:19 +0000 (15:20 +0100)] 
smtp: reset inspection buffers

8 years agohttp: fix body prune check
Victor Julien [Fri, 13 Nov 2015 13:06:32 +0000 (14:06 +0100)] 
http: fix body prune check

8 years agoUpdate Changelog for 3.0RC2
Victor Julien [Tue, 8 Dec 2015 13:08:18 +0000 (14:08 +0100)] 
Update Changelog for 3.0RC2

8 years agodns: reject bad response data
Victor Julien [Wed, 2 Dec 2015 10:37:57 +0000 (11:37 +0100)] 
dns: reject bad response data

8 years agosmtp: improve handling of bad traffic
Victor Julien [Mon, 30 Nov 2015 14:46:15 +0000 (15:46 +0100)] 
smtp: improve handling of bad traffic

No longer fail tracking the SMTP stream when a unexpected reply is
encountered.

Do not store the unexpected reply.

8 years agostream-tcp: bail early on segments before base_seq
Victor Julien [Fri, 27 Nov 2015 16:12:52 +0000 (17:12 +0100)] 
stream-tcp: bail early on segments before base_seq

In cases where base_seq has moved beyond last_ack, bail early.

8 years agotls: suppress warnings on alloc failure
Victor Julien [Mon, 7 Dec 2015 16:10:40 +0000 (17:10 +0100)] 
tls: suppress warnings on alloc failure

8 years agounified2: disable by default
Victor Julien [Sun, 6 Dec 2015 09:53:42 +0000 (10:53 +0100)] 
unified2: disable by default

8 years agostats log: suppress 0 counters by default
Victor Julien [Sun, 8 Nov 2015 08:55:00 +0000 (09:55 +0100)] 
stats log: suppress 0 counters by default

8 years agoafpacket: suppress output
Victor Julien [Sun, 8 Nov 2015 08:18:17 +0000 (09:18 +0100)] 
afpacket: suppress output

8 years agoafpacket: move zero copy setup to config parsing
Victor Julien [Sun, 8 Nov 2015 08:06:03 +0000 (09:06 +0100)] 
afpacket: move zero copy setup to config parsing

This way it's run and logged per device, instead of per thread.

8 years agoafpacket: indent fixup
Victor Julien [Sun, 8 Nov 2015 08:01:52 +0000 (09:01 +0100)] 
afpacket: indent fixup

8 years agooffloading: compress printing of iface offloading
Victor Julien [Sun, 8 Nov 2015 07:58:26 +0000 (08:58 +0100)] 
offloading: compress printing of iface offloading

8 years agoafpacket: on missing cluster settings, set defaults
Victor Julien [Sun, 8 Nov 2015 07:48:24 +0000 (08:48 +0100)] 
afpacket: on missing cluster settings, set defaults

8 years agoafpacket: add null decoder, put ethernet first
Victor Julien [Sat, 7 Nov 2015 20:24:07 +0000 (21:24 +0100)] 
afpacket: add null decoder, put ethernet first

8 years agodevice: constify string args
Victor Julien [Sat, 7 Nov 2015 18:28:25 +0000 (19:28 +0100)] 
device: constify string args

8 years agomodbus: disable by default
Jason Ish [Thu, 3 Dec 2015 21:40:08 +0000 (15:40 -0600)] 
modbus: disable by default

8 years agooutput-json: add app_proto key in root
Eric Leblond [Thu, 3 Dec 2015 11:07:03 +0000 (12:07 +0100)] 
output-json: add app_proto key in root

By adding the key in the root of *flow and fileinfo  events it
will be possible to get all events for one application layer by
using a 'event_type:proto OR app_proto:proto' filter. This will
permit to the analyst to get a good view of events related to
one protocol.

This patch also fixes a regression in file logging where app_proto
was available before 94dbd303e4744a40f3761265be7c73a7a4754764 create
the regression.

8 years agoFeature 1605: more descriptive error messages when checking MTU, etc
Alexander Gozman [Mon, 30 Nov 2015 08:21:05 +0000 (11:21 +0300)] 
Feature 1605: more descriptive error messages when checking MTU, etc

8 years agoprofiling: fix lock profile compilation
Victor Julien [Fri, 27 Nov 2015 08:50:50 +0000 (09:50 +0100)] 
profiling: fix lock profile compilation

8 years agojson: small improvement to log message wording
Victor Julien [Thu, 26 Nov 2015 12:03:11 +0000 (13:03 +0100)] 
json: small improvement to log message wording

8 years agooutput-json: fix regression on log prefix handling
Eric Leblond [Mon, 23 Nov 2015 12:46:18 +0000 (13:46 +0100)] 
output-json: fix regression on log prefix handling

The log prefix option was not anymore honored due to a regression
caused by some recent code.

8 years agoapp-layer-smtp: support for multiline response
Maurizio Abba [Mon, 16 Nov 2015 12:14:24 +0000 (12:14 +0000)] 
app-layer-smtp: support for multiline response
Multiline response support is provided but not enforced. This patch
allow parsing multiline response when a reply is processed

8 years agoUpdate changelog for 3.0RC1
Victor Julien [Wed, 25 Nov 2015 12:03:40 +0000 (13:03 +0100)] 
Update changelog for 3.0RC1

8 years agoUpdate dev version to reflect we're doing 3.0 now
Victor Julien [Wed, 25 Nov 2015 12:02:48 +0000 (13:02 +0100)] 
Update dev version to reflect we're doing 3.0 now

8 years agorule vars: fix compiler warning
Victor Julien [Wed, 25 Nov 2015 11:17:51 +0000 (12:17 +0100)] 
rule vars: fix compiler warning

8 years agotls: fix compiler warnings
Victor Julien [Tue, 24 Nov 2015 11:06:04 +0000 (12:06 +0100)] 
tls: fix compiler warnings

8 years agohttp: add test for plain http over connect
Victor Julien [Sat, 11 Jul 2015 09:43:34 +0000 (11:43 +0200)] 
http: add test for plain http over connect

8 years agohttp: don't run unittests twice
Victor Julien [Mon, 13 Jul 2015 09:26:41 +0000 (11:26 +0200)] 
http: don't run unittests twice

8 years agohttp: test cleanups
Victor Julien [Sat, 11 Jul 2015 20:52:23 +0000 (22:52 +0200)] 
http: test cleanups

8 years agoFix out-of-bounds memory access in DNS TXT record parser.
Aaron Campbell [Mon, 2 Nov 2015 19:19:12 +0000 (15:19 -0400)] 
Fix out-of-bounds memory access in DNS TXT record parser.

The datalen variable is declared unsigned.  If txtlen and datalen are equal,
datalen will first be reduced to 0, and then the datalen-- line will cause its
value to wrap to 65535.  This will cause the loop to continue much longer than
intended, and eventually may crash on an out-of-bounds *tdata dereference.

Signed-off-by: Aaron Campbell <aaron@monkey.org>
8 years agomulti-detect: fix and simplify config
Victor Julien [Mon, 23 Nov 2015 16:18:57 +0000 (17:18 +0100)] 
multi-detect: fix and simplify config

instead

mappings:
  - vlan:
    vlan-id: 1
    tenant-id: 2

we'll now use:

mappings:
  - vlan-id: 1
    tenant-id: 2

For YAML it pretty much means the same thing.

Ticket: 1517

8 years agomulti-detect: improve error handling
Victor Julien [Mon, 23 Nov 2015 13:58:34 +0000 (14:58 +0100)] 
multi-detect: improve error handling

8 years agomulti-detect: handle missing mappings
Victor Julien [Mon, 23 Nov 2015 13:05:21 +0000 (14:05 +0100)] 
multi-detect: handle missing mappings

Notify/warn user about missing mappings depending on other settings
like unix socket and init errors fatal.

8 years agomulti-detect: consider vlan tracking
Victor Julien [Mon, 23 Nov 2015 12:38:59 +0000 (13:38 +0100)] 
multi-detect: consider vlan tracking

Refuse to use vlan selector if vlan tracking is disabled.

8 years agomulti-detect: validate vlan_id
Victor Julien [Mon, 23 Nov 2015 12:30:03 +0000 (13:30 +0100)] 
multi-detect: validate vlan_id

8 years agomulti-detect: use default tenant
Victor Julien [Fri, 20 Nov 2015 14:52:50 +0000 (15:52 +0100)] 
multi-detect: use default tenant

The default detect engine can be used as 'default tenant'.

8 years agomulti-detect: clean up output
Victor Julien [Fri, 20 Nov 2015 11:05:02 +0000 (12:05 +0100)] 
multi-detect: clean up output

8 years agobase64: code style fixups
Victor Julien [Thu, 19 Nov 2015 12:37:23 +0000 (13:37 +0100)] 
base64: code style fixups

8 years agobase64_decode, base64_data: decode and match base64
Jason Ish [Wed, 30 Sep 2015 15:49:47 +0000 (09:49 -0600)] 
base64_decode, base64_data: decode and match base64

8 years agoutil-base64: strict mode - all characters must be valid
Jason Ish [Wed, 14 Oct 2015 19:37:45 +0000 (13:37 -0600)] 
util-base64: strict mode - all characters must be valid

Introduce a strict mode to base64 decode. If strict,
the function will fail when invalid input data is seen.
If not strict, what has been decoded will be returned.

This is in support of adding a Snort compatible base64_decode
rule option that uses whatever data can be decoded as a length
of data to decode is optional.

8 years agolua: added function TlsGetSNI()
Mats Klepsland [Tue, 13 Oct 2015 13:59:22 +0000 (15:59 +0200)] 
lua: added function TlsGetSNI()

Added function to get server name from TLS SNI extension.

8 years agolog-tls: added SNI field to extended output
Mats Klepsland [Tue, 13 Oct 2015 13:35:33 +0000 (15:35 +0200)] 
log-tls: added SNI field to extended output

Added SNI field to extended tls log output.

8 years agooutput-json-tls: added SNI field to extended output
Mats Klepsland [Tue, 13 Oct 2015 12:44:06 +0000 (14:44 +0200)] 
output-json-tls: added SNI field to extended output

Added SNI field to extended JSON output.

8 years agoapp-layer-ssl: get server name from SNI extension
Mats Klepsland [Tue, 13 Oct 2015 12:06:37 +0000 (14:06 +0200)] 
app-layer-ssl: get server name from SNI extension

Decode client hello handshake to get server name from SNI extension.

8 years agojson: fix malformed output
Victor Julien [Mon, 23 Nov 2015 08:56:51 +0000 (09:56 +0100)] 
json: fix malformed output

Even though the json output callback is called with a null terminated
string, it's not useable directly. The size parameter to the callback
might be a lot smaller than the string size. Libjansson gives the size
up to the first point that needs escaping.

8 years agooutput: cleanup JSON logging
Victor Julien [Mon, 2 Nov 2015 08:54:46 +0000 (09:54 +0100)] 
output: cleanup JSON logging

8 years agooutput-json: don't alloc for JSON to string
Victor Julien [Sun, 1 Nov 2015 22:43:59 +0000 (23:43 +0100)] 
output-json: don't alloc for JSON to string

8 years agorule profiling: json output
Victor Julien [Tue, 3 Nov 2015 09:58:36 +0000 (10:58 +0100)] 
rule profiling: json output

8 years agoprofiling: cleanup, remove MIN declaration
Victor Julien [Mon, 2 Nov 2015 22:00:42 +0000 (23:00 +0100)] 
profiling: cleanup, remove MIN declaration

8 years agorules-reload: fix reload with -s or -S
Eric Leblond [Thu, 22 Oct 2015 18:31:13 +0000 (20:31 +0200)] 
rules-reload: fix reload with -s or -S

When using the -S or -s option, the reload was causing the specified
rules file to be forgotten and the default rules to be loaded at
reload time.

8 years agoprscript: add rm command
Eric Leblond [Thu, 22 Oct 2015 19:20:54 +0000 (21:20 +0200)] 
prscript: add rm command

This command removes the container and the image allowing to
free the disk space allocated during the creation.

8 years agoprscript: docker do not need sudo
Eric Leblond [Thu, 22 Oct 2015 19:06:44 +0000 (21:06 +0200)] 
prscript: docker do not need sudo

Usage is not to run docker command as root but to have the user
in the docker group to be able to run docker commands.

8 years agohandle MTU discovery in multi iface case
Eric Leblond [Tue, 3 Nov 2015 08:45:53 +0000 (09:45 +0100)] 
handle MTU discovery in multi iface case

This patch adds handling of multiple interface by using as
default-packet-size the maximum MTU + header length among the
live iface.

8 years agoconfig: don't use hardcoded path
Eric Leblond [Tue, 17 Nov 2015 08:56:55 +0000 (09:56 +0100)] 
config: don't use hardcoded path

It is better to use a transformation to define the default
directory of output message instead of using an hardcoded value.
Same apply to the directory for the pid file.

8 years agosuricata: clean dump-config output
Eric Leblond [Mon, 16 Nov 2015 16:53:04 +0000 (17:53 +0100)] 
suricata: clean dump-config output

When user asks for a configuration dump, it is useless to display
the version and CPU info. Also initializing the log system conduct
to overwrite the some log files and in particular suricata.log and
this is annoying as a command should not interfere with a running
daemon.

8 years agopfring pkt acq: keep running on 'pfring_set_cluster' failure when cluster is not...
cardigliano [Thu, 22 Oct 2015 09:55:57 +0000 (11:55 +0200)] 
pfring pkt acq: keep running on 'pfring_set_cluster' failure when cluster is not required

Suricata creates a pfring cluster with a default ID = 1 when not explicitly configured,
unless the device has prefix 'dna' or 'zc'. Since pf_ring also supports other cards
implementing kernel-bypass (cluster not supported), this is preventing those cards from
running on top of this module. This patch stops suricata on 'pfring_set_cluster' failure
only when error code != PF_RING_ERROR_NOT_SUPPORTED or cluster ID has not been explicitly
configured.

8 years agothreading: avoid autofp deadlock
Victor Julien [Fri, 23 Oct 2015 16:29:10 +0000 (18:29 +0200)] 
threading: avoid autofp deadlock

When there are many threads and/or the packet pool (max-pending-packets) is
small, a potential dead lock exists between the packet pool return pool
logic and the capture threads. The autofp workers together can have all the
packets in their return pools, while the capture thread(s) are waiting at an
empty pool. A race between the worker threads and the capture thread, where
the latter signals the former, is lost by the capture thread. Now everyone
is waiting.

To avoid this scenario, this patch makes the previously hardcoded 'return
pool' threshold dynamic based on the number of threads and the packet pool
size.

It sets the threshold to the max pending packets value, divided by the number
of lister threads. The max value hasn't changed. Normally, in the autofp
runmode these are the stream/detect/log worker threads.

The max_pending_return_packets value needs to stay below the packet pool size
of the 'producers' (normally pkt capture threads but also flow timeout
injection) to avoid the deadlock.

As it's quite impossible at this time to learn how many threads will be
created before starting the runmodes, and thus spawning the threads and
already initializing the packet pools, this code sets a global variable
after runmode setup, but before the threads are 'unpaused'.

8 years agothreads: add func to count running threads of types
Victor Julien [Fri, 23 Oct 2015 16:09:24 +0000 (18:09 +0200)] 
threads: add func to count running threads of types

8 years agothreading: store thread module flags in threadvars
Victor Julien [Fri, 23 Oct 2015 16:01:55 +0000 (18:01 +0200)] 
threading: store thread module flags in threadvars

8 years agohtp: cleanup, remove unused declaration
Victor Julien [Fri, 23 Oct 2015 07:53:48 +0000 (09:53 +0200)] 
htp: cleanup, remove unused declaration

8 years agopfring pkt acq: capture loop optimisation
cardigliano [Wed, 21 Oct 2015 23:43:41 +0000 (01:43 +0200)] 
pfring pkt acq: capture loop optimisation

For each packet the capture module checks whether it is time to dump stats calling
TimeGet(). TimeGet() is an expensive function using gettimeofday() or SCSpinLock()
which affect performance. Since gettimeofday() is already called for setting packet
timestamp, it is more efficient to use the packet timestamp directly.

8 years agopfring pkt acq: removed reentrant flag
cardigliano [Wed, 21 Oct 2015 23:35:04 +0000 (01:35 +0200)] 
pfring pkt acq: removed reentrant flag

PF_RING_REENTRANT is not needed as each pfring socket is used by a single thread.

8 years agopfring pkt acq: use zero-copy recv in workers runmode
cardigliano [Wed, 21 Oct 2015 23:26:54 +0000 (01:26 +0200)] 
pfring pkt acq: use zero-copy recv in workers runmode

This patch removes packet copy when suricata is running in workers runmode,
packet copy is not needed in this case since packets are processed in sequence.

8 years agoutil-logopenfile: don't allocate redis command
Eric Leblond [Wed, 14 Oct 2015 14:40:44 +0000 (16:40 +0200)] 
util-logopenfile: don't allocate redis command

As we only have two different commands we don't need to allocate
it and can use pointer to global variables.

8 years agoutil-logopenfile: move sensor_name to filectx
Eric Leblond [Thu, 17 Sep 2015 08:28:08 +0000 (10:28 +0200)] 
util-logopenfile: move sensor_name to filectx

We will now output the sensor name independantly of the output
method if it is set in the YAML file. In the case of redis we are
using the hostname value if unset.

8 years agoutil-logopenfile: log queued events at exit
Eric Leblond [Fri, 29 May 2015 20:14:22 +0000 (22:14 +0200)] 
util-logopenfile: log queued events at exit

Do a redis query at exit to log possibly existing events.

8 years agoutil-logopenfile: don't lock syslog write
Eric Leblond [Tue, 26 May 2015 10:06:26 +0000 (12:06 +0200)] 
util-logopenfile: don't lock syslog write

8 years agoutil-logopenfile: cleaner free function
Eric Leblond [Tue, 26 May 2015 10:02:49 +0000 (12:02 +0200)] 
util-logopenfile: cleaner free function

8 years agoutil-logopenfile: don't use atomic for batch_count
Eric Leblond [Mon, 1 Jun 2015 21:14:41 +0000 (23:14 +0200)] 
util-logopenfile: don't use atomic for batch_count

8 years agoutil-logopenfile: use a function for redis write
Eric Leblond [Tue, 26 May 2015 09:53:06 +0000 (11:53 +0200)] 
util-logopenfile: use a function for redis write

8 years agoredis-output: fix sensor-name code
Eric Leblond [Tue, 26 May 2015 09:31:41 +0000 (11:31 +0200)] 
redis-output: fix sensor-name code

The sensor-name was not freed at exist and the result of SCStrdup
was not checked.

8 years agoutil-logopenfile: reconnect handling
Eric Leblond [Mon, 25 May 2015 17:38:28 +0000 (19:38 +0200)] 
util-logopenfile: reconnect handling

This patch implements reconnection handling for the redis output.
A reconnect limitation has been implemented with a limitation of
one connection per second.

8 years agoutil-logopenfile: implement redis pipelining
Eric Leblond [Sun, 24 May 2015 19:52:56 +0000 (21:52 +0200)] 
util-logopenfile: implement redis pipelining

This patch implements redis pipelining. This consist in contacting
the redis server every N events to minimize the number of TCP
exchange. This is optional and setup via the configuration file.

8 years agoutil-logopenfile: introduce SCConfLogOpenRedis
Eric Leblond [Sun, 24 May 2015 16:07:20 +0000 (18:07 +0200)] 
util-logopenfile: introduce SCConfLogOpenRedis

Introduce a function to realize the parsing and config file and
opening of connection to the database. Only used by output-json
for now it will be usable by other logging modules.

8 years agoutil-logopenfile: add write function
Eric Leblond [Sun, 24 May 2015 15:43:51 +0000 (17:43 +0200)] 
util-logopenfile: add write function

Introduce a function LogFileWrite that will handle the writing with
respect of the type defined in the configuration. This is used in
this patch to remove the write complexity from output-json.

8 years agooutput-json: add sensor-name config variable
Eric Leblond [Sat, 23 May 2015 14:59:16 +0000 (16:59 +0200)] 
output-json: add sensor-name config variable

When using redis output, we are loosing the host key (added by
logstash or logstash-forwarder) and we can't find anymore what
Suricata did cause the alert.

This patch is adding this key during message generation using the
'sensor-name' variable or the hostname is 'sensor-name' is not
defined.

8 years agotravis: add libjansson and hiredis
Eric Leblond [Sun, 8 Feb 2015 11:20:59 +0000 (12:20 +0100)] 
travis: add libjansson and hiredis

Install the libs and force usage of hiredis. We will have a more
complete build with this two libs.

8 years agooutput-json: improve hiredis define
Eric Leblond [Tue, 26 May 2015 20:49:07 +0000 (22:49 +0200)] 
output-json: improve hiredis define

Use #ifdef instead of #if and don't include the header which is
not needed anymore.

8 years agooutput-json: add redis support
Eric Leblond [Sat, 7 Feb 2015 12:10:23 +0000 (13:10 +0100)] 
output-json: add redis support

This patch adds redis support to JSON output.

8 years agodecode: add flow memcap counter
Giuseppe Longo [Mon, 12 Oct 2015 09:39:36 +0000 (11:39 +0200)] 
decode: add flow memcap counter

This adds a counter indicating how many times
the flow max memcap has been reached

Since there is no always a reference to FlowManagerThreadData,
the counter is put in DecodeThreadVars.

Currently when there is no counter increase in one call of FlowGetNew
because we don't have tv or dtv at the time of the call.

The following is a snippet of the generated EVE entry:
"flow":{"memcap":0,"spare":10000,"emerg_mode_entered":0,"emerg_mode_over":0,"tcp_reuse":0,"memuse":7085248}