Suricata is a network Intrusion Detection System, Intrusion Prevention System and Network Security Monitoring engine developed by the OISF and the Suricata community.
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Go to file
Victor Julien a0732d3db2 flow: change flow state logic
A flow has 3 states: NEW, ESTABLISHED and CLOSED.

For all protocols except TCP, a flow is in state NEW as long as just one
side of the conversation has been seen. When both sides have been
observed the state is moved to ESTABLISHED.

TCP has a different logic, controlled by the stream engine. Here the TCP
state is leading.

Until now, when parts of the engine needed to know the flow state, it
would invoke a per protocol callback 'GetProtoState'. For TCP this would
return the state based on the TcpSession.

This patch changes this logic. It introduces an atomic variable in the
flow 'flow_state'. It defaults to NEW and is set to ESTABLISHED for non-
TCP protocols when we've seen both sides of the conversation.

For TCP, the state is updated from the TCP engine directly.

The goal is to allow for access to the state without holding the Flow's
main mutex lock. This will later allow the Flow Manager(s) to evaluate
the Flow w/o interupting it.
11 years ago
benches
contrib
doc
lua output-lua: add SCPacketTimeString 11 years ago
m4
qa Suppress ARM valgrind warning 11 years ago
rules ipv6: check for MLD messages with HL not 1 11 years ago
scripts suricatasc: exit with error if command returns NOK 11 years ago
src flow: change flow state logic 11 years ago
.gitignore
.travis.yml travis-ci: use make check 11 years ago
COPYING
ChangeLog Update changelog for 2.1beta3 11 years ago
LICENSE
Makefile.am Respect DESTDIR in install-conf and install-rules. 11 years ago
Makefile.cvs
acsite.m4
autogen.sh
classification.config
config.rpath
configure.ac Fix compilation on OS X Yosemite 11 years ago
doxygen.cfg
reference.config Update reference.config 11 years ago
suricata.yaml.in tcp: add stream.reassembly.zero-copy-size option 11 years ago
threshold.config