]> git.ipfire.org Git - people/ms/suricata.git/log
people/ms/suricata.git
8 years agosuricatasc: add unregister-tenant-handler
Victor Julien [Thu, 12 Feb 2015 14:30:20 +0000 (15:30 +0100)] 
suricatasc: add unregister-tenant-handler

8 years agosuricatasc: add register-tenant-handler command
Victor Julien [Fri, 6 Feb 2015 14:08:44 +0000 (15:08 +0100)] 
suricatasc: add register-tenant-handler command

Arguments:
- tenant id (int)
- name of handler (string)
- traffic id related to handler (int, optional)

Examples:
- register-tenant-handler 1 vlan 1111
- register-tenant-handler 8 pcap

8 years agomulti-detect: implement unregister-tenant-handler
Victor Julien [Thu, 12 Feb 2015 14:56:38 +0000 (15:56 +0100)] 
multi-detect: implement unregister-tenant-handler

Remove a tenant handler from the list and apply it.

8 years agodetect: don't error out on no de_ctx
Victor Julien [Thu, 12 Feb 2015 13:13:46 +0000 (14:13 +0100)] 
detect: don't error out on no de_ctx

This can happen on a multi-detect setup with no registered
engines yet.

8 years agomulti-detect: set selector from yaml
Victor Julien [Thu, 12 Feb 2015 11:39:27 +0000 (12:39 +0100)] 
multi-detect: set selector from yaml

Yaml setting is: multi-detect.selector

Implement 'vlan' and 'direct'.

8 years agomulti-detect: error on start if no selector registered
Victor Julien [Thu, 12 Feb 2015 11:08:33 +0000 (12:08 +0100)] 
multi-detect: error on start if no selector registered

Force user to select the method at startup.

8 years agomulti-detect: register counters on 'master' det_ctx
Victor Julien [Thu, 12 Feb 2015 13:14:35 +0000 (14:14 +0100)] 
multi-detect: register counters on 'master' det_ctx

Otherwise counters are only registered after the stats api is
already fixed.

8 years agomulti-detect: allow start up with 0 tenants
Victor Julien [Thu, 12 Feb 2015 10:04:35 +0000 (11:04 +0100)] 
multi-detect: allow start up with 0 tenants

8 years agounix-socket: implement register-tenant-handler
Victor Julien [Fri, 6 Feb 2015 15:01:09 +0000 (16:01 +0100)] 
unix-socket: implement register-tenant-handler

Register tenant handlers/selectors based on what the unix command
"register-tenant-handler" tells.

Check traffic id before adding it. No duplicated registrations for
a traffic id are allowed.

8 years agomulti-detect: initial selectors for tenants
Victor Julien [Thu, 5 Feb 2015 17:58:26 +0000 (18:58 +0100)] 
multi-detect: initial selectors for tenants

The Detection Thread has the TenantGetId pointer which allows it
to select a tenant id based on the packet.

8 years agodetect: select detect engine at Detect entry
Victor Julien [Fri, 30 Jan 2015 14:04:38 +0000 (15:04 +0100)] 
detect: select detect engine at Detect entry

Limited to Pcap only currently.

8 years agounix-socket: allow tenant id with pcap-file
Victor Julien [Fri, 30 Jan 2015 13:27:05 +0000 (14:27 +0100)] 
unix-socket: allow tenant id with pcap-file

Register the tenant id that the pcap-file optionally got.

8 years agopcap-file: set tenant-id if available
Victor Julien [Fri, 30 Jan 2015 12:20:12 +0000 (13:20 +0100)] 
pcap-file: set tenant-id if available

Set the id to each packet's 'pcap_v' structure.

8 years agosuricatasc: allow for tenant id in pcap-file
Victor Julien [Fri, 30 Jan 2015 12:03:13 +0000 (13:03 +0100)] 
suricatasc: allow for tenant id in pcap-file

Allow for an optional 'tenant id' argument to pcap-file. This will
allow us to force the pcap to be inspected by this tenant.

If ommited it's 0, which means it's disabled.

8 years agodetect: use multi tenant thread init if MT enabled
Victor Julien [Thu, 29 Jan 2015 15:40:23 +0000 (16:40 +0100)] 
detect: use multi tenant thread init if MT enabled

8 years agodetect: make multi tenancy a global switch
Victor Julien [Thu, 29 Jan 2015 13:39:01 +0000 (14:39 +0100)] 
detect: make multi tenancy a global switch

At start up we will set this flag based on "multi-detect.enabled".

8 years agotenants: apply added/removed tenant
Victor Julien [Thu, 29 Jan 2015 10:33:11 +0000 (11:33 +0100)] 
tenants: apply added/removed tenant

Apply to the engine.

8 years agodetect: initial MT lookup logic
Victor Julien [Thu, 29 Jan 2015 10:20:09 +0000 (11:20 +0100)] 
detect: initial MT lookup logic

In the DetectEngineThreadCtx, store another DetectEngineThreadCtx per
tenant.

Currently it's just a simple array indexed by the tenant id.

8 years agomulti-detect: (un)register-tenant unix socket commands
Victor Julien [Mon, 12 Jan 2015 18:00:16 +0000 (19:00 +0100)] 
multi-detect: (un)register-tenant unix socket commands

Make available to live mode and unix socket mode.

register-tenant:
    Loads a new YAML, does basic validation.
    Loads a new detection engine
    Loads rules
    Add new de_ctx to master store and stores tenant id in the de_ctx so
        we can look it up by tenant id later.

unregister-tenant:
    Gets the de_ctx, moves it to the freelist
    Removes config

Introduce DetectEngineGetByTenantId, which gets a reference to the
detect engine by tenant id.

8 years agoeve alert: fix stream payload printing
Victor Julien [Wed, 22 Jul 2015 14:33:56 +0000 (16:33 +0200)] 
eve alert: fix stream payload printing

8 years agodetect: fix pass transaction handling
Victor Julien [Fri, 17 Jul 2015 19:05:14 +0000 (21:05 +0200)] 
detect: fix pass transaction handling

If a flow was 'pass'd, it means that no packet of it will flow be handled
by the detection engine. A side effect of this was that the per flow
inspect_id would never be moved forward. This in turn lead to a situation
where transactions wouldn't be freed.

This patch addresses this case by incrementing the inspect_id anyway for
the pass case.

8 years agodetect: set flow noinspect on pass in applayer/stream
Victor Julien [Fri, 17 Jul 2015 15:49:01 +0000 (17:49 +0200)] 
detect: set flow noinspect on pass in applayer/stream

If a pass rule matches in the reassembled stream and/or in the
app-layer state, it means the rest of the flow should not be
inspected.

8 years agohttp: destroy htp_tx_t even if incomplete
Victor Julien [Fri, 17 Jul 2015 13:31:56 +0000 (15:31 +0200)] 
http: destroy htp_tx_t even if incomplete

8 years agodetect: make http prefilter use disrupt flags
Victor Julien [Fri, 17 Jul 2015 11:38:36 +0000 (13:38 +0200)] 
detect: make http prefilter use disrupt flags

8 years agodetect: optimize http prefilter handing
Victor Julien [Fri, 17 Jul 2015 11:37:46 +0000 (13:37 +0200)] 
detect: optimize http prefilter handing

8 years agodetect: pass flags to inspect_id update logic
Victor Julien [Fri, 17 Jul 2015 11:32:31 +0000 (13:32 +0200)] 
detect: pass flags to inspect_id update logic

8 years agooutput-tx: use disrupt flags
Victor Julien [Fri, 17 Jul 2015 11:10:15 +0000 (13:10 +0200)] 
output-tx: use disrupt flags

8 years agoapp-layer: pass full flags around in tx handling
Victor Julien [Fri, 17 Jul 2015 11:09:37 +0000 (13:09 +0200)] 
app-layer: pass full flags around in tx handling

8 years agoapp-layer: disruption flags
Victor Julien [Thu, 16 Jul 2015 14:43:19 +0000 (16:43 +0200)] 
app-layer: disruption flags

Stream GAPs and stream reassembly depth are tracked per direction. In
many cases they will happen in one direction, but not in the other.

Example:
HTTP requests a generally smaller than responses. So on the response
side we may hit the depth limit, but not on the request side.

The asynchronious 'disruption' has a side effect in the transaction
engine. The 'progress' tracking would never mark such transactions
as complete, and thus some inspection and logging wouldn't happen
until the very last moment: when EOF's are passed around.

Especially in proxy environments with _very_ many transactions in a
single TCP connection, this could lead to serious resource issues. The
EOF handling would suddenly have to handle thousands or more
transactions. These transactions would have been stored for a long time.

This patch introduces the concept of disruption flags. Flags passed to
the tx progress logic that are and indication of disruptions in the
traffic or the traffic handling. The idea is that the progress is
marked as complete on disruption, even if a tx is not complete. This
allows the detection and logging engines to process the tx after which
it can be cleaned up.

8 years agodetect: clean up flag usage
Victor Julien [Thu, 16 Jul 2015 13:35:19 +0000 (15:35 +0200)] 
detect: clean up flag usage

8 years agodetect: constify some DetectMpmPrefilter args
Victor Julien [Thu, 16 Jul 2015 13:35:01 +0000 (15:35 +0200)] 
detect: constify some DetectMpmPrefilter args

8 years agodns: fix state progress handling
Victor Julien [Wed, 15 Jul 2015 11:58:12 +0000 (13:58 +0200)] 
dns: fix state progress handling

8 years agoapp-layer: fix args to state progress calls
Victor Julien [Wed, 15 Jul 2015 11:08:22 +0000 (13:08 +0200)] 
app-layer: fix args to state progress calls

8 years agoSync alversion/appversion types
Victor Julien [Wed, 15 Jul 2015 07:53:39 +0000 (09:53 +0200)] 
Sync alversion/appversion types

The app layer state 'version' field is incremented with each update
to the state. It is used by the detection engine to see if the current
version of the state has already been inspected. Since app layer and
detect always run closely together there is no need for a big number
here. The detect code really only checks for equal/not-equal, so wrap
arounds are not an issue.

8 years agohttp: harden tx inspection code
Victor Julien [Tue, 14 Jul 2015 18:09:36 +0000 (20:09 +0200)] 
http: harden tx inspection code

8 years agoflow/stream: xfer noinspect flags to pseudo pkts
Victor Julien [Thu, 16 Jul 2015 10:49:38 +0000 (12:49 +0200)] 
flow/stream: xfer noinspect flags to pseudo pkts

Set noinspection flags for payloads and packets on flow and stream
pseudo packets. Without these, the pseudo packets could trigger
inspection even though this was disabled for a flow.

8 years agodetect: optimize Signature layout
Victor Julien [Thu, 16 Jul 2015 09:22:04 +0000 (11:22 +0200)] 
detect: optimize Signature layout

8 years agodetect: default to u32 for SigIntId
Victor Julien [Thu, 16 Jul 2015 09:21:44 +0000 (11:21 +0200)] 
detect: default to u32 for SigIntId

8 years agofile-json: add file_id to message
Eric Leblond [Wed, 27 May 2015 12:01:36 +0000 (14:01 +0200)] 
file-json: add file_id to message

This will allow to get the filename and by consequence the file
after a parsing of the EVEV log file.

8 years agoaf-packet: implement rollover option
Eric Leblond [Fri, 19 Jun 2015 10:13:31 +0000 (12:13 +0200)] 
af-packet: implement rollover option

This patch implements the rollover option in af_packet capture.
This should heavily minimize the packet drops as well as the
maximum bandwidth treated for a single flow.

The option has been deactivated by default but it is activated in
the af_packet default section. This ensure there is no change for
old users using an existing YAML. And new users will benefit from
the change.

This option is available since Linux 3.10. An analysis of af_packet
kernel code shows that setting the flag in all cases should not
cause any trouble for older kernel.

8 years agoaf-packet: implement new load balancing modes
Eric Leblond [Fri, 19 Jun 2015 10:08:53 +0000 (12:08 +0200)] 
af-packet: implement new load balancing modes

This patch implements the fanout load balancing modes available
in kernel 4.0. The more interesting is cluster_qm that does the
load balancing based on the RSS queues. So if the network card
is doing a flow based load balancing then a given socket will
receive all packets of a flow indepently of the CPU affinity.

8 years agoaf-packet: sync header with latest features
Eric Leblond [Fri, 19 Jun 2015 10:05:05 +0000 (12:05 +0200)] 
af-packet: sync header with latest features

Sync the replacement define with the latest Linux code.
This patch also updates the detection part in configure.ac
to do a declaration of all fields if the newest features are
not present.

8 years agonetmap: support SW rings
Aleksey Katargin [Thu, 16 Jul 2015 16:17:49 +0000 (21:17 +0500)] 
netmap: support SW rings
Netmap uses SW rings to send and receive packets from OS.

8 years agonetmap: strict check for zero copy mode
Aleksey Katargin [Thu, 16 Jul 2015 13:51:03 +0000 (18:51 +0500)] 
netmap: strict check for zero copy mode
Netmap does not guarantees that mmap'ed regions for different interfaces would be the same.

8 years agonetmap: fixed autofp mode.
Aleksey Katargin [Thu, 16 Jul 2015 13:35:23 +0000 (18:35 +0500)] 
netmap: fixed autofp mode.
Previous implementation does not work with this mode.

8 years agonetmap: support non-equal count of Rx and Tx rings on interface.
Aleksey Katargin [Thu, 16 Jul 2015 12:43:28 +0000 (17:43 +0500)] 
netmap: support non-equal count of Rx and Tx rings on interface.
Netmap does not guarantees that NIC will have equal number of transmit and receive rings.

8 years agoUse unlikely for error treatment in alert-prelude.c
Schnaffon [Tue, 28 Apr 2015 10:23:12 +0000 (12:23 +0200)] 
Use unlikely for error treatment in alert-prelude.c

When handling error cases on creation of a new idmef field, we are in an unlikely case. This patch adds the unlikely() expression to indicate this to gcc.

8 years agointroduce fatal error macro's
Victor Julien [Fri, 10 Jul 2015 10:19:57 +0000 (12:19 +0200)] 
introduce fatal error macro's

Add 'FatalError' and 'FatalErrorConditonal' that will take the same
args as SCLogError.

FatalError logs the error using SCLogError and then exits with return
code EXIT_FAILURE.

FatalErrorOnInit does the same only during init and with
--init-errors-fatal enabled, otherwise it just calls SCLogWarning. So
then the macro returns to the caller.

Implement this for output setup.

8 years agolua: dns support
Victor Julien [Wed, 10 Jun 2015 10:15:10 +0000 (12:15 +0200)] 
lua: dns support

8 years agodns: generic inspect engines for DNS
Victor Julien [Wed, 10 Jun 2015 09:57:59 +0000 (11:57 +0200)] 
dns: generic inspect engines for DNS

8 years agodetect: add AppLayerTxMatch call
Victor Julien [Wed, 10 Jun 2015 09:50:51 +0000 (11:50 +0200)] 
detect: add AppLayerTxMatch call

8 years agodns: generic request/response detect lists
Victor Julien [Tue, 9 Jun 2015 13:31:32 +0000 (15:31 +0200)] 
dns: generic request/response detect lists

8 years agodns: rename type so it's purpose is more clear
Victor Julien [Tue, 9 Jun 2015 12:49:22 +0000 (14:49 +0200)] 
dns: rename type so it's purpose is more clear

8 years agolua: dns extensions
Victor Julien [Fri, 5 Jun 2015 06:53:47 +0000 (08:53 +0200)] 
lua: dns extensions

Add DNS lua calls for getting queries, answers, authorities. Also
rcode and recusion desired flags.

8 years agolua: initial DNS logging support
Victor Julien [Thu, 4 Jun 2015 08:46:26 +0000 (10:46 +0200)] 
lua: initial DNS logging support

8 years agotls-store: avoid log flooding
Eric Leblond [Wed, 15 Jul 2015 20:21:07 +0000 (22:21 +0200)] 
tls-store: avoid log flooding

In case we can't write in the certs directory, this is possible
we flood the log for each TLS session or even worse each TLS
packet.  So this patch puts a limit in the number of logged
messages related to file creation.

8 years agofilestore: use SCFree instead of free
Eric Leblond [Wed, 15 Jul 2015 11:50:22 +0000 (13:50 +0200)] 
filestore: use SCFree instead of free

8 years agotls-store: backward compatibility
Eric Leblond [Tue, 14 Jul 2015 20:35:32 +0000 (22:35 +0200)] 
tls-store: backward compatibility

This patch implements backward compatibility in suricata.yaml
file. In case the new 'tls-store' output is not present in the
YAML we have to use the value defined in 'tls-log'.

8 years agotls-store: now a separate module
Eric Leblond [Tue, 14 Jul 2015 19:22:31 +0000 (21:22 +0200)] 
tls-store: now a separate module

An design error was made when doing the TLS storage module which
has been made dependant of the TLS logging. At the time there was
only one TLS logging module but there is now two different ones.

By putting the TLS store module in a separate module, we can now
use EVE output and TLS store at the same time.

8 years agoSupport for reconnecting unix domain socket log files
Jeff Barber [Thu, 16 Jul 2015 13:39:15 +0000 (09:39 -0400)] 
Support for reconnecting unix domain socket log files
Issue #1423

8 years agologging: integrate rotation into SCConfLogOpenGeneric.
Jason Ish [Wed, 8 Jul 2015 15:49:41 +0000 (09:49 -0600)] 
logging: integrate rotation into SCConfLogOpenGeneric.

Addresses issue 1492, and will make it harder to omit
rotation on new outputs.

8 years agorule vars: strip leading white space before looking up var.
Jason Ish [Fri, 17 Jul 2015 22:22:59 +0000 (16:22 -0600)] 
rule vars: strip leading white space before looking up var.

8 years agoconfig: update yaml to show json logging option
Victor Julien [Wed, 8 Jul 2015 14:12:29 +0000 (16:12 +0200)] 
config: update yaml to show json logging option

8 years agoFix compile bad dereferences
sfd [Fri, 3 Jul 2015 04:43:02 +0000 (16:43 +1200)] 
Fix compile bad dereferences

The src/source-erf-dag.c code was not compiling. It looks like some stats counters were added but not tested as the dereferences are incorrect.

8 years agoIn non interactive mode, print errors to stderr
Alexander Gozman [Thu, 18 Jun 2015 17:44:26 +0000 (20:44 +0300)] 
In non interactive mode, print errors to stderr

8 years agosuricatasc: remove "u" prefix when printing JSON output.
Alexander Gozman [Tue, 16 Jun 2015 15:12:01 +0000 (18:12 +0300)] 
suricatasc: remove "u" prefix when printing JSON output.
If we want to parse suricatasc's output, python's unicode prefix
should be removed to make JSON parsers happy.

8 years agostream_size operator comparison (fix issue #1488)
Zopieux [Thu, 18 Jun 2015 09:26:53 +0000 (11:26 +0200)] 
stream_size operator comparison (fix issue #1488)

`DetectStreamSizeParse` was first checking if mode[0] is '<', which is true for both '<' and '<=', thus '<=' (and resp. '>=') is never matched. This patch does the `strcmp` to '<=' (resp. '>=') within the if block of '<' (resp. '>') to fix #1488.

8 years agologging: json output
Victor Julien [Thu, 21 May 2015 15:33:53 +0000 (17:33 +0200)] 
logging: json output

Make JSON output optional.

Cleanups.

8 years agologging: fix per output log formats
Victor Julien [Tue, 30 Jun 2015 09:21:39 +0000 (11:21 +0200)] 
logging: fix per output log formats

8 years agologging: optional colors output
Victor Julien [Fri, 26 Jun 2015 09:32:50 +0000 (11:32 +0200)] 
logging: optional colors output

Construct message per output method.

8 years agologging: change newline handling
Victor Julien [Tue, 30 Jun 2015 07:09:17 +0000 (09:09 +0200)] 
logging: change newline handling

8 years agooutput: cleanup
Victor Julien [Mon, 29 Jun 2015 16:38:23 +0000 (18:38 +0200)] 
output: cleanup

8 years agologging: cleanup output API
Victor Julien [Fri, 26 Jun 2015 14:10:16 +0000 (16:10 +0200)] 
logging: cleanup output API

Make SCLogMessage master of the logging. Reduces complexity
of the SCLog macro's.

8 years agolog: reorganize SCLogOPIfaceCtx to make it more efficient
Victor Julien [Thu, 25 Jun 2015 15:32:16 +0000 (17:32 +0200)] 
log: reorganize SCLogOPIfaceCtx to make it more efficient

8 years agodetect: fix settings override for reloads
Victor Julien [Mon, 6 Jul 2015 11:33:36 +0000 (13:33 +0200)] 
detect: fix settings override for reloads

8 years agoDisable pcap-config use during cross compilation
Helmut Schaa [Mon, 29 Jun 2015 14:04:14 +0000 (16:04 +0200)] 
Disable pcap-config use during cross compilation

This allows cross compilation where the host system has pcap-config
installed and would create an invalid entry in the cross-CFLAGS.

8 years agoIssue 1491: fix capabilities for pf_ring mode when running under non-root account
Alexander Gozman [Fri, 26 Jun 2015 08:38:59 +0000 (11:38 +0300)] 
Issue 1491: fix capabilities for pf_ring mode when running under non-root account

8 years agoFix issues #1493 and #1494
Alexander Gozman [Mon, 29 Jun 2015 17:46:15 +0000 (20:46 +0300)] 
Fix issues #1493 and #1494

8 years agofile_data: check for signature alproto and flow
Giuseppe Longo [Fri, 15 May 2015 09:05:29 +0000 (11:05 +0200)] 
file_data: check for signature alproto and flow

Currently the following rule can't be loaded:
alert tcp any any -> any 25 (msg:"SMTP file_data test"; flow:to_server,established; file_data; content:"abc";sid:1;)
and produces the error output:
"Can't use file_data with flow:to_server or from_client with http or smtp."

This checks if the alproto is not http in a signature,
so permits to use flow keyword also.

Issue reported by rmkml.

8 years agoMinor unittest cleanups
Victor Julien [Fri, 19 Jun 2015 12:39:44 +0000 (14:39 +0200)] 
Minor unittest cleanups

8 years agoapp-layer: fix coverity warnings
Victor Julien [Fri, 19 Jun 2015 11:39:30 +0000 (13:39 +0200)] 
app-layer: fix coverity warnings

8 years agoerspan: respect vlan.use-for-tracking setting
Victor Julien [Fri, 19 Jun 2015 11:09:36 +0000 (13:09 +0200)] 
erspan: respect vlan.use-for-tracking setting

8 years agohtp: hide BUG_ON's behind DEBUG_VALIDATION
Victor Julien [Fri, 19 Jun 2015 11:05:49 +0000 (13:05 +0200)] 
htp: hide BUG_ON's behind DEBUG_VALIDATION

8 years agosmtp json: fix potential crash on malloc failure
Victor Julien [Fri, 19 Jun 2015 11:02:29 +0000 (13:02 +0200)] 
smtp json: fix potential crash on malloc failure

** CID 1298888:    (FORWARD_NULL)
/src/output-json-email-common.c: 117 in JsonEmailLogJson()
/src/output-json-email-common.c: 140 in JsonEmailLogJson()

8 years agodetect analizer: fix minor coverity warning
Victor Julien [Fri, 19 Jun 2015 10:50:05 +0000 (12:50 +0200)] 
detect analizer: fix minor coverity warning

** CID 1298889:  Integer handling issues  (NEGATIVE_RETURNS)
/src/detect-engine-analyzer.c: 102 in EngineAnalysisFP()

8 years agofile_data smtp: fix minor coverity warning
Victor Julien [Fri, 19 Jun 2015 10:42:57 +0000 (12:42 +0200)] 
file_data smtp: fix minor coverity warning

CID 1298891:  Null pointer dereferences  (REVERSE_INULL)
Null-checking "curr_file" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.

8 years agosmb: fix coverity warning
Victor Julien [Fri, 19 Jun 2015 10:38:37 +0000 (12:38 +0200)] 
smb: fix coverity warning

** CID 1298892:  Incorrect expression  (UNUSED_VALUE)
/src/app-layer-smb.c: 1486 in SMBProbingParser()

8 years agopfring runmode: remove set that is never read
Victor Julien [Thu, 18 Jun 2015 14:07:21 +0000 (16:07 +0200)] 
pfring runmode: remove set that is never read

8 years agocounters: reduce global usage
Victor Julien [Thu, 18 Jun 2015 13:47:02 +0000 (15:47 +0200)] 
counters: reduce global usage

8 years agodce_opnum: improve memory handling on parsing error
Victor Julien [Thu, 18 Jun 2015 13:46:28 +0000 (15:46 +0200)] 
dce_opnum: improve memory handling on parsing error

8 years agohtp: fix test
Victor Julien [Thu, 18 Jun 2015 13:34:46 +0000 (15:34 +0200)] 
htp: fix test

8 years agofast log: clean up tests
Victor Julien [Thu, 18 Jun 2015 13:27:04 +0000 (15:27 +0200)] 
fast log: clean up tests

8 years agodetect hsbd: simplify resize logic
Victor Julien [Thu, 18 Jun 2015 10:04:44 +0000 (12:04 +0200)] 
detect hsbd: simplify resize logic

8 years agoapp-layer: update all protocols to accept NULL+EOF
Victor Julien [Thu, 11 Jun 2015 14:54:52 +0000 (16:54 +0200)] 
app-layer: update all protocols to accept NULL+EOF

Update all non-HTTP protocol parsers to accept a NULL+EOF input.

8 years agoapp-layer: improve EOF handling
Victor Julien [Thu, 11 Jun 2015 10:39:53 +0000 (12:39 +0200)] 
app-layer: improve EOF handling

On receiving TCP end of stream packets (e.g. RST, but also sometimes FIN
packets), in some cases the AppLayer parser would not be notified. This
could happen in IDS mode, but would especially be an issue in IPS mode.

This patch changes the logic of the AppLayer API to handle this. When no
new data is available, and the stream ends, the AppLayer API now gets
called with a NULL/0 input, but with the EOF flag set.

This allows the AppLayer parser to call it's final routines still in the
context of a real packet.

8 years agoprint: make PrintRawDataFp take a const arg
Victor Julien [Fri, 5 Jun 2015 10:47:28 +0000 (12:47 +0200)] 
print: make PrintRawDataFp take a const arg

8 years agostream: update StreamMsg to don't have fixed size
Victor Julien [Fri, 5 Jun 2015 10:30:05 +0000 (12:30 +0200)] 
stream: update StreamMsg to don't have fixed size

StreamMsg would have a fixed size buffer. This patch replaces the buffer
by a dynamically allocated buffer.

Preparation of allowing bigger and customizable buffer sizes.

8 years agostream: remove STREAMTCP_STREAM_FLAG_CLOSE_INITIATED logic
Victor Julien [Fri, 5 Jun 2015 07:54:44 +0000 (09:54 +0200)] 
stream: remove STREAMTCP_STREAM_FLAG_CLOSE_INITIATED logic

8 years agohttp: rework UT
Giuseppe Longo [Mon, 8 Jun 2015 12:06:24 +0000 (14:06 +0200)] 
http: rework UT

This reworks UT based on
commit 320355570863dfa6376c9d2af875495ccc8a199f

8 years agohttp: memcap HTTP server inspect body code
Victor Julien [Wed, 3 Jun 2015 16:16:33 +0000 (18:16 +0200)] 
http: memcap HTTP server inspect body code