Commit Graph

19 Commits (efbf627dbd0081ef10f915d20d75b2c1299272cb)

Author SHA1 Message Date
Jason Ish 44388f1b69 src: make include guards more library friendly
Include guards for libraries should use a prefix that is meaningful for
the library to avoid conflicts with other user code. For Suricata, use
SURICATA.

Additionally, remove the pattern of leading and trailing underscores as
these are reserved for the language implementation per the C and C++
standards.
3 years ago
Victor Julien 2859eeae81 classification: fix multi-tenant loading issues
Move pcre2 data structures used for parsing into the detect engine
context, so that multiple tenant loading threads don't use the same
data structures.

Bug: #4797.
3 years ago
Victor Julien 1a0af685e2 classification: spelling 3 years ago
Victor Julien 3c7ad453fe classification: spelling 3 years ago
Jeff Lucovsky 2621c90ea1 classification/config: Raise error on validation errors
This commit adds logic which raises an error if parse errors occur while
loading classification.config

Issue: 4554
4 years ago
Victor Julien 517834e327 classtype: use global defines for size limits 7 years ago
Victor Julien 954c43daf4 detect/classtype: allow undefined classtypes
Effect of classification on Suricata's working is minimal. Impact
of adding undefined classtypes is large: rules will fail to load
completely. This also leads multiple lines of log output per rule,
which in a large ruleset can lead to excessive output.

This patch changes the classtype keyword behavior. Instead of erroring
and invalidating a rule, we will merely warn.

The undefined classtype is then defined with a default priority,
so other rules using the classtype will not also warn. This way
there will be just a single warning per missing classtype.
7 years ago
Victor Julien 323a747f39 classtype: increase id size
Switch from u8 to u16 to allow for more classtypes.

Rename Signature::class to Signature::class_id to make it clear
it is an id.
7 years ago
Victor Julien ccf6c5a6ef classtype: small memory reduction
Reduce memory use by making sure SCClassConfClasstype
has a more optimal memory layout.
7 years ago
Victor Julien 26e2370f99 classtype: put UNITTESTS guards where appropriate 7 years ago
Victor Julien e104c3d913 classtype: reduce scope of functions 7 years ago
Victor Julien 46d401e3bb classification: update pcre globals use
Don't update globals each time we parse, but instead do it once at
startup.
12 years ago
Victor Julien 393689ce44 classification: remove global from parsing
Parsing code used a 'fd' global. Remove this.
12 years ago
Anoop Saldanha 6003c7cb6b clean classification config API 14 years ago
Anoop Saldanha 420befb180 Changed my email address to anoopsaldanha at gmail dot com from my current one 15 years ago
Victor Julien 7a6d4b57f0 Add support for class id in classification code. Submitted by firnsy@securixlive.com, thanks. 17 years ago
William Metcalf ce01927515 Import of GPLv2 Header 050410 17 years ago
Anoop Saldanha 011b74df63 Modify the classification config tests to use the buffer than a temp file and also fix an invalid free 17 years ago
Anoop Saldanha bc4df59414 Support for Classtype keyword and Classification Config file 17 years ago