Victor Julien
40ed10ab38
Minor flowq updates.
13 years ago
Anoop Saldanha
7115fa3e72
Introduce the address hash based flow q handler
13 years ago
Anoop Saldanha
5ffb050ada
Adapt flow tmqh counters to be atomic vars. Remove support for active flows q handler. Introduce SC_ATOMIC_SET
13 years ago
Anoop Saldanha
3faed5fe79
Support freeing flow q handler out ctx. Adapt unittests to use the same
13 years ago
Anoop Saldanha
d01589c9d8
neaten flow q handler code
13 years ago
Anoop Saldanha
0fa14292c0
Enable unittests for flow q handler
13 years ago
Anoop Saldanha
4e417b72b5
support flow q handler schedulers active_flows and active_packets. Support new yaml option autofp_scheduler. Support for printing q handler stats as well
13 years ago
Anoop Saldanha
e252048900
support for custom flow qhandlers - round robin support added
13 years ago
Pierre Chifflier
d866f38982
TLS: add variable to store the error code in the decoder
...
Use a variable to store the decoding error code if required, and remove
the calls to SCLogInfo and SCLogDebug.
13 years ago
Pierre Chifflier
218b5d3ba0
TLS app layer: misc fixes, reorder some fields to same memory
13 years ago
Pierre Chifflier
3df341dbeb
Add TLS decode events
13 years ago
Pierre Chifflier
71fa4a5285
TLS: replace SigMatchAppendAppLayer with SigMatchAppendSMToList
13 years ago
Eric Leblond
a9bb17e097
tls-handshake: add sanity checks.
13 years ago
Eric Leblond
01c7e5bde6
tls-handshake: Add some missing free in error handling.
...
When DecodeAsn1BuildValue function fails, it may be necessary to
do some clean-up in the calling functions.
13 years ago
Eric Leblond
480db00fd7
tls-handshake: DecodeAsn1BuildValue should return -1 for error
...
This patch modifies DecodeAsn1BuildValue to have it return -1 when
there is a too big number of bytes announced in the ASN.1 message.
13 years ago
Eric Leblond
8f885ce810
TLS parser: add sanity checks on loop
...
It was possible in some loop to read data placed after the buffer
resulting in invalid/unpredictable value. This patch fixes two of
this issues.
13 years ago
Eric Leblond
d1c56e810b
TLS parser: add sanity check
13 years ago
Eric Leblond
cb1a75fc9e
TLS parser: modify OCTETSTRING
...
This patch does on over allocation of 1 for the OCTETSTRING
to be able to add a 0 at the end. This will then
allow us to use the string in printf.
13 years ago
Pierre Chifflier
5a65a17f00
TLS parser: add handing of UTF8STRING
...
Some certificate contains UTF8STRING which is a subset of
OCTETSTRING. This patch adds support for this type of string.
13 years ago
Pierre Chifflier
6c2c6cffac
TLS keywords: fix match regex (remove extra space)
13 years ago
Pierre Chifflier
8457ce3b11
TLS app layer: rewrite decoder to handle multiple messages in records
...
Since we now parse the content of the TLS messages, we need to handle
the case multiple messages are shipped in a single TLS record, and
taking care of the multiple levels of fragmentation (message, record,
and TCP).
Additionally, fix a bug where the parser state was not reset after an
empty record.
13 years ago
Pierre Chifflier
4bb5e2a79d
TLS app layer: fix number of bytes processed on SERVER_CERTIFICATE message.
...
Change the function to return the number of bytes processed, and fix a bug
where the input buffer was wrong.
Signed-off-by: Pierre Chifflier <pierre.chifflier@ssi.gouv.fr>
13 years ago
Eric Leblond
38c213cb84
tls app layer: add missing free
...
issuerdn was not freed at exit.
13 years ago
Eric Leblond
fce2437dc2
tls app layer: handle negation on subject and issuerdn.
...
This patch adds negation support for tls.subject and tls.issuerdn
matches.
13 years ago
Eric Leblond
ad0e05a112
TLS app layer: Add tls.issuerdn keyword.
13 years ago
Eric Leblond
afba81bb27
decode ASN.1: Factorize value reading
...
This patch factorizes the reading of integer value and fix some
indentation. By convention, a value of 0xffffffff is returned
if the size of the integer is too big. In this case, the hexadecimal
value (which is also read) must be used.
13 years ago
Pierre Chifflier
53e5421a24
TLS handshake: get TLS ciphersuite and compression
...
Decode the SERVER_HELLO message to extract the ciphersuite and compression
chosen by the server.
Signed-off-by: Pierre Chifflier <pierre.chifflier@ssi.gouv.fr>
13 years ago
Pierre Chifflier
4be65fd016
TLS handshake: decode the SERVER_CERTIFICATE message
...
Add a decoder for the SERVER_CERTIFICATE during a TLS handshake, extracts the
certificates and keep the subject name.
Add the tls.subject keyword for substring match in rules (TLS layer).
Signed-off-by: Pierre Chifflier <pierre.chifflier@ssi.gouv.fr>
13 years ago
Pierre Chifflier
f77fcdb3e8
Add ASN.1 parser for X509 certificates (in DER format)
...
Signed-off-by: Pierre Chifflier <pierre.chifflier@ssi.gouv.fr>
13 years ago
Victor Julien
0b3f6c464a
Make list-app-layer-protos option name match the help explanation. Make sure it works w/o passing a config.
13 years ago
Anoop Saldanha
109662450d
Add new command line option --list-app-layer-protocols to list supported app layer protocols in sigs
13 years ago
Anoop Saldanha
7511fa67cd
Add BUG_ON to avoid overruning AppLayerDetectDirection map array
13 years ago
Eileen Donlon
9376967e65
reject rules with duplicate content modifiers
...
reject rules that have multiple depths, offsets, distances, fast_patterns, nocases, or rawbytes for the same content.
13 years ago
Eileen Donlon
0bb4ff34b8
added null checks for init_hash to all ac mpms
13 years ago
Eileen Donlon
617edf469c
reject http_client_body with inconsistent flow dir
...
reject http_client_body with flow: to_client or from_server
13 years ago
Victor Julien
feff6f7705
Clean up error message.
13 years ago
Eileen Donlon
85c364da09
disallow-use-of-configuration-file-with-unittests
13 years ago
Victor Julien
d908e707d7
profiling: add per lock location profiling
...
Add profiling per lock location in the code. Accounts how often a
lock is requested, how often it was contended, the max number of
ticks spent waiting for it, avg number of ticks waiting for it and
the total ticks for that location.
Added a new configure flag --enable-profiling-locks to enable this
feature.
13 years ago
Victor Julien
41e9dba20b
Profile pcap file callback.
13 years ago
Victor Julien
ff8755af5c
Make sure stream debug code is only used in debug mode.
13 years ago
Victor Julien
9696902b68
Small http.log improvement: bail out early if there is nothing to log. Make output locking more fine grained.
13 years ago
Victor Julien
e581ec7dff
Fix 2 compilation issues.
13 years ago
Victor Julien
c0a2cbd478
Move over src and dst thresholding to use host table. Fix a bug in threshold 'both' handling.
13 years ago
Victor Julien
a05df345de
Introduce host table, make tag use it
...
Add a host table similar to the flow table. A hash using fine grained
locking. Flow manager for now takes care of book keeping / garbage
collecting.
Tag subsystem now uses this for host based tagging instead of the
global tag hash table. Because the latter used a global lock and the
new code uses very fine grained locking this patch should improve
scalability.
13 years ago
Victor Julien
db24258acf
Undo changes from 88b8f15663
. Atomic stack implementation had a-b-a problem.
13 years ago
Victor Julien
88b8f15663
Add atomic stack implementation. Convert flow spare queue to use this stack. Remove now unused flow-queue code.
13 years ago
Victor Julien
4a186bcf1d
Fix invalid declaration of enable_nss and enable_nspr in configure.in.
13 years ago
Victor Julien
979edf0b97
Add way to profile mutex/spin locks per thread module.
13 years ago
Victor Julien
fddaca6e8b
Implement stream memcap enforcements using atomics instead of spinlocked counters.
13 years ago
Victor Julien
d72b82fae0
Misc fixes.
13 years ago