]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
8 years agocommon: improve byte order and wordsize detection 2661/head
Victor Julien [Mon, 10 Apr 2017 07:39:23 +0000 (09:39 +0200)] 
common: improve byte order and wordsize detection

8 years agocore dumps: check for sys/resource.h
Victor Julien [Mon, 10 Apr 2017 07:38:59 +0000 (09:38 +0200)] 
core dumps: check for sys/resource.h

8 years agocleanup: get rid of %llu format specifiers
Victor Julien [Sun, 9 Apr 2017 19:04:14 +0000 (21:04 +0200)] 
cleanup: get rid of %llu format specifiers

Use more explicit types instead.

8 years agodoc: Napatech docs improvement
psanders240 [Thu, 16 Mar 2017 19:41:16 +0000 (15:41 -0400)] 
doc: Napatech docs improvement

Fix errors and simplify filters.

8 years agotemplate script: typo in app-layer setup script
Jason Ish [Mon, 10 Apr 2017 04:12:12 +0000 (22:12 -0600)] 
template script: typo in app-layer setup script

Check for ed was failing, as it was actually looking for edx.

8 years agopcre: on ppc64 disable only for specific versions
Victor Julien [Thu, 13 Apr 2017 07:58:36 +0000 (09:58 +0200)] 
pcre: on ppc64 disable only for specific versions

Disable jit only for libpcre 8.39 and 8.40 as those were the buggy
versions.

Thanks to Zoltán Herczeg.

8 years agodoc: expand on bpf
Victor Julien [Thu, 13 Apr 2017 07:25:11 +0000 (09:25 +0200)] 
doc: expand on bpf

8 years agodetect: don't consider an empty rule file an error 2655/head
Jason Ish [Wed, 15 Mar 2017 16:52:57 +0000 (10:52 -0600)] 
detect: don't consider an empty rule file an error

8 years agologging: only do non-blocking writes if live
Jason Ish [Wed, 5 Apr 2017 04:44:21 +0000 (22:44 -0600)] 
logging: only do non-blocking writes if live

If running against a pcap there is no reason to drop events,
a blocking socket is fine here. So only do non-blocking writes
when running off a live device.

8 years agoeve: log number of events dropped at exit
Jason Ish [Wed, 5 Apr 2017 04:21:37 +0000 (22:21 -0600)] 
eve: log number of events dropped at exit

8 years agologging: don't block on socket writes
Jason Ish [Thu, 23 Feb 2017 22:22:42 +0000 (16:22 -0600)] 
logging: don't block on socket writes

Writing to a unix socket can cause Suricata to block in the
packet path. This could happen if the read-endpoint of the
unix socket stays connected, but stops reading, or simply
can't read fast enough as part of its event processing.

To choose packets over events, do non-blocking socket
writes and drop the event if the write would block and
update a dropped counter.

8 years agodoc: add documentation for date modifiers in eve-log
Mats Klepsland [Tue, 14 Feb 2017 09:59:41 +0000 (10:59 +0100)] 
doc: add documentation for date modifiers in eve-log

8 years agodoc: add documentation for eve-log file rotation
Mats Klepsland [Tue, 14 Feb 2017 09:53:34 +0000 (10:53 +0100)] 
doc: add documentation for eve-log file rotation

8 years agologging: create log directories when needed
Mats Klepsland [Tue, 14 Feb 2017 09:32:33 +0000 (10:32 +0100)] 
logging: create log directories when needed

Recursively create new log directories when needed. This makes it
possible to use date modifiers in the file path to create
directories based on date, e.g.:

  /var/log/suricata/2017/02/14/

8 years agooutput-json: rotate log file based on time
Mats Klepsland [Tue, 14 Feb 2017 07:41:40 +0000 (08:41 +0100)] 
output-json: rotate log file based on time

Rotate log file based on time. Support both rotating based on a timer (XXs,
XXm, XXd, XXw) and rotating based on a absolute time, like each minute,
hour or day.

8 years agologging: support date modifiers in log filenames
Mats Klepsland [Tue, 14 Feb 2017 07:29:44 +0000 (08:29 +0100)] 
logging: support date modifiers in log filenames

Allow log filenames to contain date modifiers, e.g.:

  - eve-log:
    filename: eve-%Y-%m-%d-%H:%M:%S.json

8 years agopcre: disable jit on powerpc64 2653/head
Victor Julien [Thu, 6 Apr 2017 11:05:35 +0000 (13:05 +0200)] 
pcre: disable jit on powerpc64

It appears that both using gcc and clang something gets misoptimised
around pcre's jit. So disable jit for now.

8 years agodefrag: (windows) detect more overlaps
Jason Ish [Mon, 6 Mar 2017 20:38:04 +0000 (14:38 -0600)] 
defrag: (windows) detect more overlaps

8 years agodefrag: (linux) fix an error in overlapping fragments
Jason Ish [Mon, 6 Mar 2017 17:23:48 +0000 (11:23 -0600)] 
defrag: (linux) fix an error in overlapping fragments

If a subsequent fragment has a lower offset than a previous
one and overlaps, trim off the beginning of the previous
fragment.

Based on an issue reported privately.

8 years agodefrag: use new unit test macros
Jason Ish [Mon, 6 Mar 2017 03:17:47 +0000 (21:17 -0600)] 
defrag: use new unit test macros

Also reformat unit test functions to Suricata style.

8 years agotravis: use new container build infrastructure
Jason Ish [Wed, 29 Mar 2017 20:09:32 +0000 (14:09 -0600)] 
travis: use new container build infrastructure

Migrate to the new Travis container build system. This build system does
not allow use of sudo, so required packages must be done declaratively
which required reworking how we install packages that are conditional
based on the build being done.

Mac builds are still done with sudo=true.

8 years agounix-socket: return failure on failure
Jason Ish [Tue, 4 Apr 2017 13:51:19 +0000 (07:51 -0600)] 
unix-socket: return failure on failure

UnixManagerThreadInit needs to return a failure code if the socket
fails to initialize to avoid entering the UnixManager loop which
will continuously fail on the call to bind, as no listening
socket was setup.

This can occur when the socket fails to initialize due to a
permissions error and fatal init errors is not on.

8 years agolog: tls custom format log
fooinha [Sat, 3 Dec 2016 19:26:16 +0000 (19:26 +0000)] 
log: tls custom format log

8 years agolog: common custom format output
fooinha [Sat, 3 Dec 2016 12:22:26 +0000 (12:22 +0000)] 
log: common custom format output

8 years agogeoip: fix compiler warning
Victor Julien [Thu, 6 Apr 2017 06:59:34 +0000 (08:59 +0200)] 
geoip: fix compiler warning

detect-geoip.c:78:40: error: incompatible pointer types assigning to 'int (*)(ThreadVars *, DetectEngineThreadCtx *, Packet *, const Signature *, const SigMatchCtx *)' from 'int (ThreadVars *, DetectEngineThreadCtx *, Packet *, Signature *, const SigMatchCtx *)' [-Werror,-Wincompatible-pointer-types]
    sigmatch_table[DETECT_GEOIP].Match = DetectGeoipMatch;
                                       ^ ~~~~~~~~~~~~~~~~
1 error generated.

Bug #2045

8 years agomodbus: fix compiler warnings about alignment
Victor Julien [Wed, 5 Apr 2017 19:19:33 +0000 (15:19 -0400)] 
modbus: fix compiler warnings about alignment

app-layer-modbus.c:1226:39: warning: taking address of packed member 'transactionId' of class or structure 'ModbusHeader_' may result in an unaligned pointer value [-Waddress-of-packed-member]
    if (ModbusExtractUint16(modbus, &(header->transactionId), input, input_len, &offset)    ||
                                      ^~~~~~~~~~~~~~~~~~~~~
app-layer-modbus.c:1228:39: warning: taking address of packed member 'protocolId' of class or structure 'ModbusHeader_' may result in an unaligned pointer value [-Waddress-of-packed-member]
        ModbusExtractUint16(modbus, &(header->protocolId), input, input_len, &offset)       ||
                                      ^~~~~~~~~~~~~~~~~~
app-layer-modbus.c:1230:39: warning: taking address of packed member 'length' of class or structure 'ModbusHeader_' may result in an unaligned pointer value [-Waddress-of-packed-member]
        ModbusExtractUint16(modbus, &(header->length), input, input_len, &offset)           ||
                                      ^~~~~~~~~~~~~~
3 warnings generated.

Bug #2088

8 years agopool: fix compiler warning
Victor Julien [Wed, 5 Apr 2017 13:13:17 +0000 (15:13 +0200)] 
pool: fix compiler warning

clang-4.0 reported:

util-pool.c:242:13: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses]
        if (! pb->flags & POOL_BUCKET_PREALLOCATED) {
            ^           ~
util-pool.c:242:13: note: add parentheses after the '!' to evaluate the bitwise operator first
        if (! pb->flags & POOL_BUCKET_PREALLOCATED) {
            ^
              (                                   )
util-pool.c:242:13: note: add parentheses around left hand side expression to silence this warning
        if (! pb->flags & POOL_BUCKET_PREALLOCATED) {
            ^
            (          )
util-pool.c:261:13: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses]
        if (! pb->flags & POOL_BUCKET_PREALLOCATED) {
            ^           ~
util-pool.c:261:13: note: add parentheses after the '!' to evaluate the bitwise operator first
        if (! pb->flags & POOL_BUCKET_PREALLOCATED) {
            ^
              (                                   )
util-pool.c:261:13: note: add parentheses around left hand side expression to silence this warning
        if (! pb->flags & POOL_BUCKET_PREALLOCATED) {
            ^
            (          )
2 warnings generated.

8 years agoaf-packet: fix cppcheck false positive 2644/head
Victor Julien [Mon, 3 Apr 2017 14:09:18 +0000 (16:09 +0200)] 
af-packet: fix cppcheck false positive

[src/source-af-packet.c:1903]: (error) Resource leak: fd

8 years agohttp: fix body tracking corner case 2629/head
Victor Julien [Wed, 29 Mar 2017 09:15:51 +0000 (11:15 +0200)] 
http: fix body tracking corner case

In some cases, observed with inspect limits 0, the body tracking could
get confused. When all chunks were already freed, a new chunk would
be considered to be the start of the body. This would overwrite the
bodies 'content_len_so_far' tracker, instead of adding to it. This in
turn could lead to a assertion abort in the inspection code.

This patch redoes the append code to always add the current lenght. It
cleans up the code to remove redundant logic.

Issue: https://redmine.openinfosecfoundation.org/issues/2078
Reported-By: Jørgen Bøhnsdalen
8 years agodefrag: fix argument used in macro to match signature 2627/head
Jason Ish [Mon, 20 Mar 2017 16:54:51 +0000 (10:54 -0600)] 
defrag: fix argument used in macro to match signature

"p" was being used in the macro but was not an argument to
the macro, but it worked due to the context of the macro.

Use the actual macro argument, d2, instead of p.

Results in no change to generated code.

8 years agodoc: add documentation for Lua SCFlowTimestamps
Mats Klepsland [Fri, 10 Mar 2017 06:23:30 +0000 (07:23 +0100)] 
doc: add documentation for Lua SCFlowTimestamps

8 years agolua: add SCFlowTimestamps function
Mats Klepsland [Fri, 10 Mar 2017 06:07:09 +0000 (07:07 +0100)] 
lua: add SCFlowTimestamps function

Add SCFlowTimestamps() to return startts and lastts as seconds and
microseconds from flow.

Examples:

  startts, lastts = SCFlowTimestamps()
  startts_s, lastts_s, startts_us, lastts_us = SCFlowTimestamps()

8 years agodoc: add documentation for eve-log file permissions 2626/head
Mats Klepsland [Wed, 22 Feb 2017 06:54:26 +0000 (07:54 +0100)] 
doc: add documentation for eve-log file permissions

8 years agologging: support custom file permissions
Mats Klepsland [Tue, 21 Feb 2017 09:41:57 +0000 (10:41 +0100)] 
logging: support custom file permissions

Support setting file permissions per logger using 'filemode', e.g.:

  outputs:
    - eve-log:
        enabled: yes
        filetype: regular
        filename: eve.json
        filemode: 660

8 years agoipv4: update checksum function to be like tcp/udp 2624/head
Jason Ish [Tue, 21 Feb 2017 19:42:50 +0000 (13:42 -0600)] 
ipv4: update checksum function to be like tcp/udp

Update the IPv4 checksum function to be like the
changed TCP/UDP checksum functions for consistency.

8 years agotcp/udp: rename checksum functions for better meaning
Jason Ish [Tue, 21 Feb 2017 19:31:41 +0000 (13:31 -0600)] 
tcp/udp: rename checksum functions for better meaning

The TCP/UDP checksum functions no longer just calculate
the checksum, they can validate as well as calculate so
use a more generic name.

8 years agotcp/udp: fix checksum validation when 0xffff
Jason Ish [Fri, 17 Feb 2017 22:04:23 +0000 (16:04 -0600)] 
tcp/udp: fix checksum validation when 0xffff

Issue:
https://redmine.openinfosecfoundation.org/issues/2041

One approach to fixing this issue to just validate the
checksum instead of regenerating it and comparing it. This
method is used in some kernels and other network tools.

When validating, the current checksum is passed in as an
initial argument which will cause the final checksum to be 0
if OK. If generating a checksum, 0 is passed and the result
is the generated checksum.

8 years agodocs: fix statement about flow:to_server
Jon Zeolla [Mon, 13 Mar 2017 16:51:44 +0000 (12:51 -0400)] 
docs: fix statement about flow:to_server

8 years agodocs: clarify how iprep works
Jon Zeolla [Mon, 13 Mar 2017 16:49:04 +0000 (12:49 -0400)] 
docs: clarify how iprep works

8 years agotravis: macos: unlink all deps, then relink
Jason Ish [Fri, 24 Mar 2017 19:59:39 +0000 (13:59 -0600)] 
travis: macos: unlink all deps, then relink

Kind of ugly, but first unlink all dependencies then install.
The deps that don't get an upgrade will remain unlinked, so
relink all dependencies as relinking an already linked dep
does not error out.

8 years agoprint: constify input 2622/head
Victor Julien [Mon, 13 Mar 2017 12:53:52 +0000 (13:53 +0100)] 
print: constify input

8 years agodetect: fix ssl_state test
Victor Julien [Thu, 9 Mar 2017 11:57:40 +0000 (12:57 +0100)] 
detect: fix ssl_state test

8 years agodisable-detect: fix needless file hashing
Victor Julien [Wed, 1 Mar 2017 22:32:21 +0000 (23:32 +0100)] 
disable-detect: fix needless file hashing

When detection is running flags are set on flows to indicate if file
hashing is needed. This is based on global output settings and rules.

In the case of --disable-detection this was not happening, so all
files where hashed with all methods. This has a significant
performance impact.

This patch adds logic to set the flow flags in --disable-detect mode.

8 years agoapp-layer: remove version logic
Victor Julien [Tue, 28 Feb 2017 08:38:00 +0000 (09:38 +0100)] 
app-layer: remove version logic

8 years agoflow: remove unused alversion fields
Victor Julien [Mon, 27 Feb 2017 22:51:31 +0000 (23:51 +0100)] 
flow: remove unused alversion fields

8 years agodetect: remove unused alversion logic
Victor Julien [Mon, 27 Feb 2017 22:44:00 +0000 (23:44 +0100)] 
detect: remove unused alversion logic

8 years agodetect: simplify state detect code: remove unused params
Victor Julien [Mon, 27 Feb 2017 22:39:41 +0000 (23:39 +0100)] 
detect: simplify state detect code: remove unused params

8 years agodetect: clean up test
Victor Julien [Mon, 27 Feb 2017 23:28:10 +0000 (00:28 +0100)] 
detect: clean up test

8 years agobytejump: don't print errors when matching
Victor Julien [Mon, 6 Mar 2017 09:54:57 +0000 (10:54 +0100)] 
bytejump: don't print errors when matching

When bytejump was told to convert some payload data to int from a
string it would print an error to the screen if the conversion
failed. This is unwanted as the payload is controlled by an attacker
and printing is expensive.

8 years agofile-store: fix force store
Victor Julien [Wed, 1 Mar 2017 22:23:04 +0000 (23:23 +0100)] 
file-store: fix force store

8 years agoapp-layer: fix gap handling in protocol detection
Victor Julien [Sun, 26 Feb 2017 18:56:38 +0000 (19:56 +0100)] 
app-layer: fix gap handling in protocol detection

A GAP during protocol detection would lead to all reassembly
getting disabled, so also the raw reassembly. In addition, it
could prevent the opposing side from doing protocol detection.

This patch remove the 'disable reassembly' logic. Stream engine
will take the stream with GAP and app-layer will make the proto
detection as complete.

8 years agofile store: store multiple files if available
Victor Julien [Fri, 10 Mar 2017 18:12:32 +0000 (19:12 +0100)] 
file store: store multiple files if available

8 years agoapp-layer: fix memleak on bad traffic
Victor Julien [Thu, 23 Feb 2017 15:45:32 +0000 (16:45 +0100)] 
app-layer: fix memleak on bad traffic

If state was alloc'd after protocol detection, but then the direction
turned out to be wrong, the state would not be freed.

8 years agoippair: fix xbits unset memleak
Victor Julien [Mon, 27 Feb 2017 19:38:41 +0000 (20:38 +0100)] 
ippair: fix xbits unset memleak

8 years agoippair: use both addresses in hash
Victor Julien [Mon, 27 Feb 2017 17:32:22 +0000 (18:32 +0100)] 
ippair: use both addresses in hash

8 years agostream: validate SACK right edge to be in window
Victor Julien [Mon, 27 Feb 2017 11:27:11 +0000 (12:27 +0100)] 
stream: validate SACK right edge to be in window

8 years agostream: remove unused stream config member
Victor Julien [Sun, 26 Feb 2017 17:32:27 +0000 (18:32 +0100)] 
stream: remove unused stream config member

8 years agostream: make data pointer in StreamSegmentCallback const
Victor Julien [Sun, 24 Apr 2016 07:33:54 +0000 (09:33 +0200)] 
stream: make data pointer in StreamSegmentCallback const

8 years agostream: remove unused variable
Victor Julien [Fri, 17 Feb 2017 15:00:42 +0000 (16:00 +0100)] 
stream: remove unused variable

8 years agoapp-layer: minor debug improvement
Victor Julien [Wed, 22 Feb 2017 15:34:37 +0000 (16:34 +0100)] 
app-layer: minor debug improvement

8 years agoqa/appveyor: install libiconv-devel 2621/head
Victor Julien [Fri, 24 Mar 2017 09:15:09 +0000 (10:15 +0100)] 
qa/appveyor: install libiconv-devel

8 years agotravis: fix pkg-config in mac builds
Victor Julien [Fri, 24 Mar 2017 11:40:18 +0000 (12:40 +0100)] 
travis: fix pkg-config in mac builds

Unlink pkg-config before installing.

8 years agotravis: fix libpcre in mac builds
Jason Ish [Fri, 17 Mar 2017 17:11:07 +0000 (11:11 -0600)] 
travis: fix libpcre in mac builds

It looks like Travis changed their Mac image and pcre is now
installed by default. In case it gets removed again, just unlink
it before re-installing so it doesn't fail on install.

8 years agologging: remove unused print stats callbacks 2592/head 2605/head 2606/head
Jason Ish [Mon, 20 Feb 2017 18:00:15 +0000 (12:00 -0600)] 
logging: remove unused print stats callbacks

Remove the ThreadExitPrintStats callback from logging modules
that weren't doing anything with it.

8 years agologging: move lock into write function
Jason Ish [Mon, 20 Feb 2017 17:52:34 +0000 (11:52 -0600)] 
logging: move lock into write function

All loggers were wrapping just the write in a lock with some
updating a counter.  This moves the lock into the write function.

The log_ctx alerts counter was also removed as many modules have
stopped using this and the alert count is available elsewhere.

Should satisfy Coverity CID 1400798:

CID 1400798 (#1 of 1): Data race condition (MISSING_LOCK) 2.
missing_lock: Accessing log_ctx->rotation_flag without holding lock
LogFileCtx_.fp_mutex. Elsewhere, "LogFileCtx_.rotation_flag" is accessed
with LogFileCtx_.fp_mutex held 4 out of 5 times.

Which appears to be a false positive as all calls to SCLogFileWrite
were done under lock, but this will make it more explicit.

8 years agounified2: unlock using same dereference as lock
Jason Ish [Fri, 17 Feb 2017 17:22:23 +0000 (11:22 -0600)] 
unified2: unlock using same dereference as lock

Addresses Coverity CIDs:
    1400797
    1400796

Note that the mutex was actually being unlocked, but
from a different variable pointing to the same mutex.

8 years agodoc: add documentation for TlsGetCertSerial Lua function
Mats Klepsland [Tue, 17 Jan 2017 08:53:23 +0000 (09:53 +0100)] 
doc: add documentation for TlsGetCertSerial Lua function

8 years agodoc: add documentation for tls_cert_serial keyword
Mats Klepsland [Mon, 20 Feb 2017 07:33:49 +0000 (08:33 +0100)] 
doc: add documentation for tls_cert_serial keyword

8 years agodetect: add (mpm) keyword tls_cert_serial
Mats Klepsland [Mon, 20 Feb 2017 07:27:23 +0000 (08:27 +0100)] 
detect: add (mpm) keyword tls_cert_serial

Match on TLS certificate serial number using tls_cert_serial
keyword, e.g.:

alert tls any any -> any any (msg:"TLS cert serial test";
        tls_cert_serial; content:"5C:19:B7:B1:32:3B:1C:A1";
        sid:12345;)

8 years agolua: add function to print certificate serial number
Mats Klepsland [Tue, 17 Jan 2017 08:23:30 +0000 (09:23 +0100)] 
lua: add function to print certificate serial number

Add function LuaGetCertSerial to print serial number from TLS
certificate.

Example:

function log (args)
    serial = TlsGetCertSerial()

    if serial then
        file:write(serial .. "\n");
        file:flush()
    end
end

8 years agotls-log: log certificate serial number
Mats Klepsland [Tue, 17 Jan 2017 08:22:10 +0000 (09:22 +0100)] 
tls-log: log certificate serial number

8 years agooutput-json-lua: log certificate serial number
Mats Klepsland [Tue, 17 Jan 2017 08:21:30 +0000 (09:21 +0100)] 
output-json-lua: log certificate serial number

8 years agoapp-layer-tls: decode certificate serial number
Mats Klepsland [Tue, 17 Jan 2017 08:20:25 +0000 (09:20 +0100)] 
app-layer-tls: decode certificate serial number

8 years agoaf-packet: fix parsing packet in TPACKET_V3 mode
Alexander Gozman [Mon, 20 Feb 2017 13:47:31 +0000 (16:47 +0300)] 
af-packet: fix parsing packet in TPACKET_V3 mode

AFPParsePacketV3() saved tpacket_block_desc structure
instead of tpacket3_hdr. As a result, reconstructed
packets were wrong.

Bug #2044.

8 years agoaf-packet: get VLAN info for packets in TPACKET_V3 mode
Alexander Gozman [Mon, 20 Feb 2017 13:43:10 +0000 (16:43 +0300)] 
af-packet: get VLAN info for packets in TPACKET_V3 mode

8 years agoaf-packet: write VLAN info for both TPACKET_V2 and V3
Alexander Gozman [Mon, 20 Feb 2017 13:41:18 +0000 (16:41 +0300)] 
af-packet: write VLAN info for both TPACKET_V2 and V3

8 years agopidfile: fail if the pid file exists
Jason Ish [Fri, 17 Feb 2017 16:46:43 +0000 (10:46 -0600)] 
pidfile: fail if the pid file exists

Changes the pidfile check function to fail just on the
existence of the file to address issue
https://redmine.openinfosecfoundation.org/issues/1335
but log a message if the pid file appears to be stale.

8 years agodoc: specify buffers that can be used for fast_pattern
David Wharton [Mon, 20 Feb 2017 13:29:59 +0000 (08:29 -0500)] 
doc: specify buffers that can be used for fast_pattern

Updated notes on the following buffers indicating that they can
be used for fast_pattern:
tls_cert_subject
tls_cert_issuer
tls_sni

8 years agodoc: removed references to older Suricata versions
David Wharton [Mon, 20 Feb 2017 13:27:05 +0000 (08:27 -0500)] 
doc: removed references to older Suricata versions

docs are versioned; references to older Suricata versions undesired.

8 years agodoc: add documentation for TLS eve-log 2580/head 2584/head
Mats Klepsland [Tue, 17 Jan 2017 11:45:21 +0000 (12:45 +0100)] 
doc: add documentation for TLS eve-log

8 years agooutput-json-tls: code cleanup
Mats Klepsland [Fri, 13 Jan 2017 12:07:59 +0000 (13:07 +0100)] 
output-json-tls: code cleanup

8 years agooutput-json-tls: log certificate and chain
Mats Klepsland [Fri, 13 Jan 2017 11:20:34 +0000 (12:20 +0100)] 
output-json-tls: log certificate and chain

Log entire certificate and certificate chain Base64 encoded.

8 years agooutput-json-tls: custom tls logging
Mats Klepsland [Thu, 22 Dec 2016 10:36:19 +0000 (11:36 +0100)] 
output-json-tls: custom tls logging

8 years agodoc: update unified2 section 2572/head
Jason Ish [Tue, 17 Jan 2017 06:33:17 +0000 (00:33 -0600)] 
doc: update unified2 section

Remove documentation on older unified formats that have
been removed.

8 years agounified2: nostamp and file rotation
Jason Ish [Mon, 16 Jan 2017 22:25:56 +0000 (16:25 -0600)] 
unified2: nostamp and file rotation

Give unified2 a nostamp option which will create the file
without the timestamp suffix (like Snort's nostamp option).

Also register for rotation notification on SIGHUP so the file
will be recreated if it is removed by an external rotation
program (only when nostamp is used).

8 years agoautoconf - look for stdbool.h
Jason Ish [Mon, 16 Jan 2017 22:02:43 +0000 (16:02 -0600)] 
autoconf - look for stdbool.h

8 years agounified2: minor cleanups
Jason Ish [Mon, 16 Jan 2017 20:45:32 +0000 (14:45 -0600)] 
unified2: minor cleanups

- remove unused arguments and make static

8 years agoMakefile: fix race condition in make install-full
Jason Ish [Thu, 16 Feb 2017 19:02:58 +0000 (13:02 -0600)] 
Makefile: fix race condition in make install-full

Use recursive make for the install process so it
is executed in a predictable order.

Addresses issue:
https://redmine.openinfosecfoundation.org/issues/1470
which triggered on OSX/macOS.

8 years agooutput-json-alert: print 'tunnel' JSON object if tunnel
Mats Klepsland [Fri, 27 Jan 2017 11:50:08 +0000 (12:50 +0100)] 
output-json-alert: print 'tunnel' JSON object if tunnel

Log src_ip, dst_ip and proto for root packet (p->root) if the
packet that triggered is inside a tunnel, as JSON object
'tunnel'. Also log recursion depth to indicate the depth of
the tunnel.

8 years agooutput-json: move code to get 5-tuple to own function
Mats Klepsland [Fri, 27 Jan 2017 11:42:08 +0000 (12:42 +0100)] 
output-json: move code to get 5-tuple to own function

Move code to get 5-tuple in JSON object to own function 'JsonFiveTuple'.
This enables this code to be reused when printing 'parent' JSON object in
output-json-alert.

8 years agooutput-json-alert: fix wrongful comments
Mats Klepsland [Fri, 27 Jan 2017 09:19:01 +0000 (10:19 +0100)] 
output-json-alert: fix wrongful comments

8 years agodoc: documentation for custom JSON flags in eve-log
Mats Klepsland [Wed, 25 Jan 2017 13:11:49 +0000 (14:11 +0100)] 
doc: documentation for custom JSON flags in eve-log

8 years agooutput-json: make JSON flags in eve-log user configurable
Mats Klepsland [Thu, 19 Jan 2017 06:15:00 +0000 (07:15 +0100)] 
output-json: make JSON flags in eve-log user configurable

8 years agodce: remove commented out code
Victor Julien [Fri, 17 Feb 2017 11:50:30 +0000 (12:50 +0100)] 
dce: remove commented out code

8 years agoflow-worker: clean up thread init
Victor Julien [Thu, 16 Feb 2017 15:41:06 +0000 (16:41 +0100)] 
flow-worker: clean up thread init

8 years agocoverity: suppress CID 1400648
Victor Julien [Thu, 16 Feb 2017 14:52:49 +0000 (15:52 +0100)] 
coverity: suppress CID 1400648

8 years agodetect-ssh: cleanup duplicate code
Victor Julien [Thu, 16 Feb 2017 14:38:26 +0000 (15:38 +0100)] 
detect-ssh: cleanup duplicate code

8 years agodetect-lua: setup cleanup, fixing a potential int issue
Victor Julien [Thu, 16 Feb 2017 14:36:16 +0000 (15:36 +0100)] 
detect-lua: setup cleanup, fixing a potential int issue

8 years agodetect: fix missing unlock in error path
Victor Julien [Thu, 16 Feb 2017 14:27:09 +0000 (15:27 +0100)] 
detect: fix missing unlock in error path

8 years agothreads: address sleep under lock issue
Victor Julien [Thu, 12 Jan 2017 09:19:27 +0000 (10:19 +0100)] 
threads: address sleep under lock issue