]> git.ipfire.org Git - people/ms/suricata.git/commit
app-layer: disruption flags
authorVictor Julien <victor@inliniac.net>
Thu, 16 Jul 2015 14:43:19 +0000 (16:43 +0200)
committerVictor Julien <victor@inliniac.net>
Wed, 22 Jul 2015 10:13:43 +0000 (12:13 +0200)
commitea571add738d73e1e8bbe6c4206c7d24813ad237
treedf9557ebccdc99ee77bf4ab4a0ab5d5ee97225a9
parent8125e04b39243ca75dd2a7ac8f51f5c7e0c8bd8d
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.
18 files changed:
src/app-layer-parser.c
src/detect-engine-hcbd.c
src/detect-engine-hcd.c
src/detect-engine-hhd.c
src/detect-engine-hhhd.c
src/detect-engine-hmd.c
src/detect-engine-hrhd.c
src/detect-engine-hrhhd.c
src/detect-engine-hrl.c
src/detect-engine-hrud.c
src/detect-engine-hsbd.c
src/detect-engine-hscd.c
src/detect-engine-hsmd.c
src/detect-engine-hua.c
src/detect-engine-uri.c
src/detect.c
src/flow.c
src/flow.h