]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
7 years agorandom: support getrandom(2) if available 2944/head
Victor Julien [Thu, 19 Oct 2017 07:51:18 +0000 (09:51 +0200)] 
random: support getrandom(2) if available

Ticket: #2193

7 years agonapatech: fix minor memleak in error path
Victor Julien [Thu, 19 Oct 2017 07:03:13 +0000 (09:03 +0200)] 
napatech: fix minor memleak in error path

7 years agoyaml: print errors if integers are invalid
Victor Julien [Thu, 19 Oct 2017 06:59:36 +0000 (08:59 +0200)] 
yaml: print errors if integers are invalid

7 years agodetect: error out on invalid detect.profile option
Victor Julien [Thu, 19 Oct 2017 06:41:09 +0000 (08:41 +0200)] 
detect: error out on invalid detect.profile option

Bug #891.

7 years agoyaml: add 'append' to stats-log entry
Victor Julien [Thu, 19 Oct 2017 06:24:47 +0000 (08:24 +0200)] 
yaml: add 'append' to stats-log entry

Bug #798

7 years agochangelog: update for 4.0.1 release suricata-4.0.1
Victor Julien [Wed, 18 Oct 2017 08:33:47 +0000 (10:33 +0200)] 
changelog: update for 4.0.1 release

7 years agoautotools: fix distcheck with rust enabled
Jason Ish [Wed, 18 Oct 2017 12:53:03 +0000 (14:53 +0200)] 
autotools: fix distcheck with rust enabled

7 years agostats: use unshortened interface names in counters 2941/head
Sascha Steinbiss [Sat, 16 Sep 2017 06:29:35 +0000 (07:29 +0100)] 
stats: use unshortened interface names in counters

7 years agojson: skip over double dots in output tokenizing
Sascha Steinbiss [Fri, 1 Sep 2017 14:24:56 +0000 (16:24 +0200)] 
json: skip over double dots in output tokenizing

Interface name shortening introduces double periods ('..') as spacers,
which cause issues during JSON stats serialization as there '.'
characters are also used as separators to define nesting of the JSON
output. This commit makes sure that '..' are skipped during tokenizing.
Fixes Redmine bug #2208.

7 years agorust/file: improve truncation handling 2940/head
Victor Julien [Mon, 2 Oct 2017 16:34:08 +0000 (18:34 +0200)] 
rust/file: improve truncation handling

7 years agodetect/state: fix offset mask logic
qiangbei [Sun, 8 Oct 2017 12:49:05 +0000 (20:49 +0800)] 
detect/state: fix offset mask logic

changed 0xef to 0x7f

7 years agorunmodes: fix 'threads' option parsing
Victor Julien [Fri, 13 Oct 2017 07:22:49 +0000 (09:22 +0200)] 
runmodes: fix 'threads' option parsing

Don't cast int to uint8_t for no reason. Add warning that upper
limit for threads is 1024.

Small code cleanups.

Bug: #2228

7 years agooutput: harden output deinit
Victor Julien [Sun, 15 Oct 2017 19:25:07 +0000 (21:25 +0200)] 
output: harden output deinit

If thread setup fails allow output deinit code to be called with
NULL data without crashing.

7 years agostream: improve error handling of ssn/segment pools
Victor Julien [Fri, 13 Oct 2017 07:05:02 +0000 (09:05 +0200)] 
stream: improve error handling of ssn/segment pools

With large number of threads the default memcaps lead to pool setup
failures. Make sure these are reported properly so that the user
knows what is going on.

Bug: #2226

7 years agorust/dns: fix new warning in rustc 1.21 2937/head
Victor Julien [Sun, 15 Oct 2017 19:18:22 +0000 (21:18 +0200)] 
rust/dns: fix new warning in rustc 1.21

7 years agorust/nfs: fix new warnings in rustc 1.21
Victor Julien [Sun, 15 Oct 2017 19:16:56 +0000 (21:16 +0200)] 
rust/nfs: fix new warnings in rustc 1.21

7 years agodoc/file_data: add note on negated matching 2925/head
Victor Julien [Thu, 5 Oct 2017 09:11:13 +0000 (11:11 +0200)] 
doc/file_data: add note on negated matching

Explain issue #2216 and how to avoid it.

7 years agodoc/napatech: formatting fixes
Victor Julien [Thu, 5 Oct 2017 09:11:00 +0000 (11:11 +0200)] 
doc/napatech: formatting fixes

7 years agoprofiling: fix app-layer profiling and csv output 2924/head
Victor Julien [Sun, 24 Sep 2017 11:55:34 +0000 (13:55 +0200)] 
profiling: fix app-layer profiling and csv output

7 years agodebug: free pcre memory used for output filtering
Victor Julien [Tue, 3 Oct 2017 08:31:39 +0000 (10:31 +0200)] 
debug: free pcre memory used for output filtering

7 years agotls: don't set event on small input data
Victor Julien [Fri, 29 Sep 2017 17:10:46 +0000 (19:10 +0200)] 
tls: don't set event on small input data

On very small data the max loop count could be 0. Make sure
it's always at least 1.

7 years agoprscript: update urls to use OISF repo
Eric Leblond [Sat, 30 Sep 2017 10:35:14 +0000 (12:35 +0200)] 
prscript: update urls to use OISF repo

7 years agotravis: hook check-setup.sh into the build 2923/head
Jason Ish [Sun, 1 Oct 2017 10:28:47 +0000 (11:28 +0100)] 
travis: hook check-setup.sh into the build

Only do it for one build, for now use the one that also
enables Rust.

7 years agotemplate: script to check the setup scripts
Jason Ish [Sun, 1 Oct 2017 10:28:07 +0000 (11:28 +0100)] 
template: script to check the setup scripts

This script applies the setup scripts one by one followed
by a make distcheck.

7 years agotemplate scripts: allow to be called from top or src
Jason Ish [Sun, 1 Oct 2017 09:41:29 +0000 (10:41 +0100)] 
template scripts: allow to be called from top or src

Allow the template setup script to be called from the top source
directory or from ./src to unify where they can be executed
from.

7 years agotemplates: rename scripts to use - instead of _
Jason Ish [Sun, 1 Oct 2017 08:54:13 +0000 (09:54 +0100)] 
templates: rename scripts to use - instead of _

Use "-" consistently instead of a mix of - and _.

setup_decoder.sh -> setup-decoder.sh
setup_simple_detect.sh -> setup-simple-detect.sh

7 years agogithub: codeowners syntax fixes 2917/head
Victor Julien [Sat, 30 Sep 2017 14:50:47 +0000 (16:50 +0200)] 
github: codeowners syntax fixes

7 years agogithub: add codeowners file 2912/head
Victor Julien [Sat, 30 Sep 2017 11:13:58 +0000 (13:13 +0200)] 
github: add codeowners file

Initial version.

See https://help.github.com/articles/about-codeowners/

7 years agotemplate: fix decoder setup script 2900/head
Victor Julien [Wed, 6 Sep 2017 12:56:06 +0000 (14:56 +0200)] 
template: fix decoder setup script

7 years agotemplate: fix setup detect script
Victor Julien [Mon, 4 Sep 2017 19:03:56 +0000 (21:03 +0200)] 
template: fix setup detect script

7 years agotemplate: minor updates
Victor Julien [Mon, 4 Sep 2017 12:54:24 +0000 (14:54 +0200)] 
template: minor updates

Merge inspect engine into keyword

7 years agodns: fix last timestamp handling
Derek [Thu, 7 Sep 2017 03:23:25 +0000 (20:23 -0700)] 
dns: fix last timestamp handling

Fixes incorrect variable in ticket #2207

In app-layer-dns-tcp.c in the DNSTCPResponseParse function
a variable is set to last_req when it should be last_resp.
This makes it consistent with UDP DNS response parsing.

7 years agoaf-packet: free bpf program
Eric Leblond [Mon, 18 Sep 2017 18:30:20 +0000 (20:30 +0200)] 
af-packet: free bpf program

This fixes a small memory leak when Suricata is running with a
BPF filter.

7 years agoaf-packet: call thread deinit function
Eric Leblond [Mon, 18 Sep 2017 18:24:29 +0000 (20:24 +0200)] 
af-packet: call thread deinit function

7 years agoprscript: update docker code
Eric Leblond [Sat, 9 Sep 2017 09:13:29 +0000 (11:13 +0200)] 
prscript: update docker code

Update docker code to latest docker python API. This patch
preserves backwrd compatibility with older versions.

7 years agodoc: reflect most recent cpu affinity settings 2890/head
Andreas Herz [Sat, 9 Sep 2017 21:22:06 +0000 (23:22 +0200)] 
doc: reflect most recent cpu affinity settings

Some settings like output-cpu-set never been used and detect got renamed
to worker. This reflects those changes already present in the yaml also
within the documentation.

7 years agoapp-layer-ssl: fix bug with >255 records in one stream 2882/head
Mats Klepsland [Wed, 9 Aug 2017 19:07:03 +0000 (21:07 +0200)] 
app-layer-ssl: fix bug with >255 records in one stream

7 years agorule-parser: bump sids within siggroup test
Andreas Herz [Fri, 11 Aug 2017 21:53:55 +0000 (23:53 +0200)] 
rule-parser: bump sids within siggroup test

7 years agorule-parser: detect duplicate rev keyword
Andreas Herz [Fri, 11 Aug 2017 21:25:44 +0000 (23:25 +0200)] 
rule-parser: detect duplicate rev keyword

7 years agorule-parser: detect duplicate sid keyword
Andreas Herz [Fri, 11 Aug 2017 21:24:22 +0000 (23:24 +0200)] 
rule-parser: detect duplicate sid keyword

7 years agorule-parser: detect duplicate classtype keyword
Andreas Herz [Fri, 11 Aug 2017 21:11:46 +0000 (23:11 +0200)] 
rule-parser: detect duplicate classtype keyword

7 years agoafpacket: free ring mem on error
Victor Julien [Tue, 29 Aug 2017 10:57:53 +0000 (12:57 +0200)] 
afpacket: free ring mem on error

7 years agoBug #2201: af_packet - treat BPF filter error as fatal 2880/head
Alexander Gozman [Sun, 20 Aug 2017 12:22:34 +0000 (15:22 +0300)] 
Bug #2201: af_packet - treat BPF filter error as fatal

There is no need to try to set erroneous BPF filter again and again. Such attempts
lead to constant mmap() calls without corresponding munmap() when 'use-mmap' is enabled.

8 years agoredis: support for rpush in list mode 2868/head
Julian [Fri, 2 Jun 2017 15:34:44 +0000 (17:34 +0200)] 
redis: support for rpush in list mode

This adds a new redis mode rpush. Also more consistent config keywords orientated at the redis command: lpush and publish.
Keeping list and channel config keywords for backwards compatibility

8 years agoapp-layer-tls: don't decode client certificates
Mats Klepsland [Wed, 2 Aug 2017 12:49:43 +0000 (14:49 +0200)] 
app-layer-tls: don't decode client certificates

Decoding client certificate overwrites the validity dates from the
server certificate, so we therefore don't decode it, since we don't
do anything with it (right now) anyway.

Fixes Bug #2050

8 years agoRust/Lua: cast value to arch-dependant type (fix build on x86, #2197)
Pierre Chifflier [Wed, 2 Aug 2017 08:00:07 +0000 (10:00 +0200)] 
Rust/Lua: cast value to arch-dependant type (fix build on x86, #2197)

8 years agonapatech: Implementation of packet counters 2862/head
Phil Young [Mon, 17 Jul 2017 14:59:00 +0000 (10:59 -0400)] 
napatech: Implementation of packet counters

added util-napatech module which contains implementation threads
for processing statistics.  And modified source-napatech and
runmode-napatech to instantiate the threads.

napatech: Implementation of packet counters

napatech: implementation of statistics counters

napatech: Implementation of packet counters.

napatech: added util-napatech module

napatech: added utils-napatech module.

added include declaration and napatech specific structure when HAVE_NAPATECH
is defined.

Added util-napatech module to project.

8 years agonapatech: configuration changes.
Phil Young [Mon, 17 Jul 2017 14:11:26 +0000 (10:11 -0400)] 
napatech: configuration changes.

Added comments describing parameter usage.
Changed example to use range formatting of streams.

8 years agonapatech: Added section describing packet counters.
Phil Young [Mon, 17 Jul 2017 14:08:02 +0000 (10:08 -0400)] 
napatech: Added section describing packet counters.

8 years agonapatech: Added description of hba usage.
Phil Young [Mon, 17 Jul 2017 14:03:44 +0000 (10:03 -0400)] 
napatech: Added description of hba usage.

8 years agodetect-msg: cleanup error message
Victor Julien [Tue, 1 Aug 2017 08:13:10 +0000 (10:13 +0200)] 
detect-msg: cleanup error message

8 years agorule-parser: ignore duplicated msg keyword
Andreas Herz [Sat, 29 Jul 2017 22:14:50 +0000 (00:14 +0200)] 
rule-parser: ignore duplicated msg keyword

8 years agoupdated fedora libevent package names 2861/head
jason taylor [Mon, 31 Jul 2017 15:41:19 +0000 (11:41 -0400)] 
updated fedora libevent package names

Signed-off-by: jason taylor <jtfas90@gmail.com>
8 years agochangelog: update for 4.0.0 suricata-4.0.0
Victor Julien [Thu, 27 Jul 2017 07:02:12 +0000 (09:02 +0200)] 
changelog: update for 4.0.0

8 years agodoc: add rust and update version in install
Victor Julien [Wed, 26 Jul 2017 14:08:05 +0000 (16:08 +0200)] 
doc: add rust and update version in install

8 years agodcerpc: improve stub buffer handling 2857/head
Victor Julien [Mon, 24 Jul 2017 08:11:20 +0000 (10:11 +0200)] 
dcerpc: improve stub buffer handling

Stub data buffer could grow without limit depending on traffic.

This patch improves the handling. It honors the 'last frag' setting
and implements a hard limit of 1MB per buffer.

Bug #2186

8 years agodcerpc: cleanup, remove unused field
Victor Julien [Fri, 21 Jul 2017 11:18:21 +0000 (13:18 +0200)] 
dcerpc: cleanup, remove unused field

8 years agoafl: add dcerpc entry points
Victor Julien [Fri, 21 Jul 2017 10:38:49 +0000 (12:38 +0200)] 
afl: add dcerpc entry points

Add for requests and mix of request/responses.

Implement storing the files to disk and rereading them.

8 years agostream/bypass: more liberal policy if no detection
Victor Julien [Mon, 24 Jul 2017 16:48:23 +0000 (18:48 +0200)] 
stream/bypass: more liberal policy if no detection

The reason the stream engine can't easily decide to bypass streams
is that there can be non-stream dependent rules that wouldn't match
if bypassing is done too aggressively.

However, if there is no detection engine, there is no reason to hold
back. In this case we can bypass as soon as the stream engine is done
with a session.

8 years agoaf-packet: optimize BPF
Eric Leblond [Fri, 30 Jun 2017 13:00:40 +0000 (15:00 +0200)] 
af-packet: optimize BPF

This patch turn on code optimization on BPF filter building by
libpcap. This allow to reduce the size of the BPF bytecode and
thus increase the size of BPF filter supported by Suricata.

Reported-by: Martijn van Oosterhout
8 years agoapp-layer-ssh: trigger bypass when done
Eric Leblond [Thu, 20 Jul 2017 08:19:01 +0000 (10:19 +0200)] 
app-layer-ssh: trigger bypass when done

Trigger bypass when application layer will not inspect anymore.

8 years agoautogen: cleanup rust strict warning 2854/head
Jason Ish [Mon, 24 Jul 2017 16:40:53 +0000 (10:40 -0600)] 
autogen: cleanup rust strict warning

8 years agoSample systemd unit file for Suricata.
Jason Ish [Thu, 20 Jul 2017 20:53:09 +0000 (14:53 -0600)] 
Sample systemd unit file for Suricata.

Create a sample systemd unit file based on the build time
configuration.

Redmine issue:
https://redmine.openinfosecfoundation.org/issues/2138

8 years agoSample logrotate configuration file.
Jason Ish [Mon, 24 Jul 2017 15:14:17 +0000 (09:14 -0600)] 
Sample logrotate configuration file.

Create a sample logrotate configuration file with filenames
set for the configuration.

8 years agodetect: more gracefully handle mpm prepare failure 2850/head
Victor Julien [Wed, 19 Jul 2017 10:45:39 +0000 (12:45 +0200)] 
detect: more gracefully handle mpm prepare failure

Exit with error instead of using the detection engine in a broken state.

Bug #2187

8 years agodetect: reject dsize rules that can't match
Victor Julien [Wed, 19 Jul 2017 10:16:48 +0000 (12:16 +0200)] 
detect: reject dsize rules that can't match

Rules can contain conflicting statements and lead to a unmatchable rule.

2 examples are rejected by this patch:

1. dsize < content
2. dsize < content@offset

Bug #2187

8 years agoUpdate public-data-sets.rst with stratosphere project
Sebastian Garcia [Fri, 14 Jul 2017 14:30:48 +0000 (16:30 +0200)] 
Update public-data-sets.rst with stratosphere project

Add the datasets of the Stratosphere project to the list.

8 years agomingw: don't try to build unix socket
Victor Julien [Sat, 15 Jul 2017 08:00:57 +0000 (10:00 +0200)] 
mingw: don't try to build unix socket

8 years agowindows: use wpcap instead of pcap
Victor Julien [Sat, 15 Jul 2017 07:48:40 +0000 (09:48 +0200)] 
windows: use wpcap instead of pcap

Windows pcap libraries such as winpcap all use a library name of
wpcap instead of just pcap. Support this in configure.

8 years agowin32: minor compile warning fixes
Victor Julien [Mon, 17 Jul 2017 08:09:01 +0000 (10:09 +0200)] 
win32: minor compile warning fixes

8 years agomingw: fix random function
Victor Julien [Fri, 14 Jul 2017 19:12:50 +0000 (21:12 +0200)] 
mingw: fix random function

8 years agococci: add test to check for uint use
Victor Julien [Fri, 14 Jul 2017 19:06:37 +0000 (21:06 +0200)] 
cocci: add test to check for uint use

uint is non-standard and not supported by MinGW. So ban it's use.

spatch file by Eric Leblond.

8 years agocleanup: remove all uint use
Victor Julien [Fri, 14 Jul 2017 19:03:04 +0000 (21:03 +0200)] 
cleanup: remove all uint use

8 years agococci: ban memmem
Victor Julien [Fri, 14 Jul 2017 19:30:36 +0000 (21:30 +0200)] 
cocci: ban memmem

8 years agodnp3: use BasicSearch instead of memmem
Jason Ish [Fri, 14 Jul 2017 19:31:10 +0000 (13:31 -0600)] 
dnp3: use BasicSearch instead of memmem

Mingw doesn't support memmem.

8 years agorust: require jansson for rust build
Jason Ish [Fri, 14 Jul 2017 15:09:33 +0000 (09:09 -0600)] 
rust: require jansson for rust build

8 years agotravis: enable strict rust; use rust 1.15.0
Jason Ish [Fri, 14 Jul 2017 14:28:44 +0000 (08:28 -0600)] 
travis: enable strict rust; use rust 1.15.0

Adds --enable-rust-strict to fail on warnings. Also update
the minimum Rust version from 1.7.0 to 1.15.0.

8 years agorust: --enable-rust-strict to turn warnings into errors
Jason Ish [Fri, 14 Jul 2017 14:26:30 +0000 (08:26 -0600)] 
rust: --enable-rust-strict to turn warnings into errors

8 years agodoc: add pid-file section to suricata.yaml doc
Jason Ish [Mon, 17 Jul 2017 21:07:27 +0000 (15:07 -0600)] 
doc: add pid-file section to suricata.yaml doc

Redmine issue:
https://redmine.openinfosecfoundation.org/issues/2104

8 years agosuricata.yaml: better comment on pid-file option
Jason Ish [Mon, 17 Jul 2017 20:58:57 +0000 (14:58 -0600)] 
suricata.yaml: better comment on pid-file option

Redmine issue:
https://redmine.openinfosecfoundation.org/issues/2104

8 years agodoc: add more details to log rotation doc
Jason Ish [Mon, 17 Jul 2017 20:55:20 +0000 (14:55 -0600)] 
doc: add more details to log rotation doc

8 years agodoc: move log rotation to output section
Jason Ish [Mon, 17 Jul 2017 17:42:18 +0000 (11:42 -0600)] 
doc: move log rotation to output section

8 years agorust/dns/tcp - probe even if payload is short 2838/head
Jason Ish [Thu, 13 Jul 2017 16:28:48 +0000 (10:28 -0600)] 
rust/dns/tcp - probe even if payload is short

As the DNS probe just uses the query portion of a response, don't
require there to be as many bytes as specified in the TCP DNS
header. This can occur in large responses where probe is called
without all the data.

Fixes the cases where the app proto is recorded as failed.

Fixes issue:
https://redmine.openinfosecfoundation.org/issues/2169

8 years agogcc7: format-truncation fix for lua
Victor Julien [Fri, 14 Jul 2017 09:05:51 +0000 (11:05 +0200)] 
gcc7: format-truncation fix for lua

8 years agochangelog: update for 4.0.0-rc2 release suricata-4.0.0-rc2
Victor Julien [Wed, 12 Jul 2017 14:45:41 +0000 (16:45 +0200)] 
changelog: update for 4.0.0-rc2 release

8 years agoder/asn1: limit recursion
Victor Julien [Mon, 10 Jul 2017 08:15:54 +0000 (10:15 +0200)] 
der/asn1: limit recursion

Limit the number of recursive calls in the DER/ASN.1 decoder to avoid
stack overflows.

Found using AFL.

8 years agorust/nfs: implement events 2835/head
Victor Julien [Wed, 12 Jul 2017 08:56:56 +0000 (10:56 +0200)] 
rust/nfs: implement events

Remove lots of panic statements in favor of setting non-fatal events.

Bug #2175.

8 years agoradix: fix risky malloc call 2834/head
Victor Julien [Thu, 13 Jul 2017 08:04:47 +0000 (10:04 +0200)] 
radix: fix risky malloc call

GCC7 said:
  CC       util-radix-tree.o
In file included from util-debug-filters.h:29:0,
                 from util-debug.h:34,
                 from suricata-common.h:421,
                 from util-radix-tree.c:26:
util-radix-tree.c: In function ‘SCRadixAddKey’:
util-mem.h:177:12: error: argument 1 range [1844674407156206796818446744073709551615] exceeds maximum object size 9223372036854775807 [-Werror=alloc-size-larger-than=]
     ptrmem = malloc((a)); \
     ~~~~~~~^~~~~~~~~~~~~
util-radix-tree.c:749:42: note: in expansion of macro ‘SCMalloc’
             if ( (inter_node->netmasks = SCMalloc((node->netmask_cnt - i) *
                                          ^~~~~~~~
In file included from suricata-common.h:69:0,
                 from util-radix-tree.c:26:
/usr/include/stdlib.h:443:14: note: in a call to allocation function ‘malloc’ declared here
 extern void *malloc (size_t __size) __THROW __attribute_malloc__ __wur;
              ^~~~~~

scan-build said:
util-radix-tree.c:749:42: warning: Call to 'malloc' has an allocation size of 0 bytes
            if ( (inter_node->netmasks = SCMalloc((node->netmask_cnt - i) *
                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./util-mem.h:177:14: note: expanded from macro 'SCMalloc'
    ptrmem = malloc((a)); \
             ^~~~~~~~~~~
1 warning generated.

8 years agogcc7: fix format-truncation warnings in runmodes
Victor Julien [Thu, 13 Jul 2017 07:57:40 +0000 (09:57 +0200)] 
gcc7: fix format-truncation warnings in runmodes

Example:

util-runmodes.c: In function ‘RunModeSetIPSAutoFp’:
util-runmodes.c:496:40: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=]
         snprintf(qname, sizeof(qname), "pickup%d", thread+1);
                                        ^~~~~~~~~~
util-runmodes.c:496:9: note: ‘snprintf’ output between 8 and 17 bytes into a destination of size16
         snprintf(qname, sizeof(qname), "pickup%d", thread+1);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Solved by reducing 'thread' to a uint16_t and limiting the max
thread count to 1024.

8 years agogcc7: fix format truncation warning
Victor Julien [Thu, 13 Jul 2017 07:06:39 +0000 (09:06 +0200)] 
gcc7: fix format truncation warning

detect-rpc.c: In function ‘DetectRpcParse’:
detect-rpc.c:225:50: error: ‘%s’ directive argument is null [-Werror=format-truncation=]
                 SCLogError(SC_ERR_INVALID_VALUE, "invalid rpc option %s",args[i]);
                                                  ^
util-debug.h:239:77: note: in definition of macro ‘SCLogErr’
             int _sc_log_ret = snprintf(_sc_log_msg, SC_LOG_MAX_LOG_MSG_LEN, __VA_ARGS__);   \
                                                                             ^~~~~~~~~~~
detect-rpc.c:225:17: note: in expansion of macro ‘SCLogError’
                 SCLogError(SC_ERR_INVALID_VALUE, "invalid rpc option %s",args[i]);
                 ^~~~~~~~~~

8 years agopcap-log: fix path construct check
Victor Julien [Thu, 13 Jul 2017 06:51:30 +0000 (08:51 +0200)] 
pcap-log: fix path construct check

8 years agogcc7: fixes for format string warnings 2833/head
Victor Julien [Wed, 12 Jul 2017 16:44:33 +0000 (18:44 +0200)] 
gcc7: fixes for format string warnings

GCC 7.1.1 on Fedora gave several warnings with -Wimplicit-fallthrough
and -Wformat-truncation

This patch addresses the warnings.

8 years agorust/nfs: improve proto detect 2831/head
Victor Julien [Mon, 10 Jul 2017 09:51:43 +0000 (11:51 +0200)] 
rust/nfs: improve proto detect

8 years agorust/nfs: remove debug rec_size check
Victor Julien [Mon, 10 Jul 2017 08:26:38 +0000 (10:26 +0200)] 
rust/nfs: remove debug rec_size check

Records larger than 40k are perfectly valid.

Bug #2162.

8 years agoproto detect: improve 'failed' handling
Victor Julien [Tue, 11 Jul 2017 09:06:51 +0000 (11:06 +0200)] 
proto detect: improve 'failed' handling

Don't try to call parser for 'failed'. Also don't set one direction
warning if TS is failed and our direction is unknown/complete so failed
as well.

8 years agossl: minor code reformatting
Victor Julien [Tue, 11 Jul 2017 09:06:21 +0000 (11:06 +0200)] 
ssl: minor code reformatting

8 years agoapp-layer: increment flow counter if one sided
Eric Leblond [Sun, 14 May 2017 18:40:51 +0000 (20:40 +0200)] 
app-layer: increment flow counter if one sided

In the case of protocol like SMTP, we detect application layer on
only one side.  Consequence was a missed increment in the flow
counter.

8 years agostream: don't reset state on syn/ack resend
Victor Julien [Mon, 10 Jul 2017 12:33:09 +0000 (14:33 +0200)] 
stream: don't reset state on syn/ack resend

Bug #1958.

The reset was originally created for issue #523, but that works
well without the reset as well.

8 years agodecode: add config option to disable teredo 2827/head
Victor Julien [Fri, 7 Jul 2017 14:32:50 +0000 (16:32 +0200)] 
decode: add config option to disable teredo

Ticket #744.

8 years agostats: print alert count at shutdown 2826/head
Victor Julien [Fri, 7 Jul 2017 11:34:21 +0000 (13:34 +0200)] 
stats: print alert count at shutdown

Bug #1855.