Philippe Antoine
1674239442
detect: checks for overflow when comparing signatures priorities
5 years ago
Victor Julien
abca451901
flow: suppress Coverity FP
5 years ago
Victor Julien
204302cbac
flow: minor code cleanup
5 years ago
Victor Julien
42ce297e0e
flow: turn BUG_ON into debug check
5 years ago
Eric Leblond
6494abc6b1
ebpf: fix invalid description in doc string
5 years ago
Victor Julien
e1ecb7dc41
doc/datasets: explain reloads, general improvements
5 years ago
Victor Julien
6492fe0841
detect/app-layer-events: improve warnings/errors
...
Improve handling of outdated events that are no longer supported by the engine.
5 years ago
Eric Leblond
48c30efd34
prscript: port to python 3
5 years ago
Victor Julien
8cd82486e2
flow/bypass: don't bypass on flow timeout pseudo packets
5 years ago
Jason Ish
cc2c7b731a
rule parsing: valid that input rule string is UTF8
...
Before parsing a rule string, validate that it is UTF-8 first.
Related Redmine issue:
https://redmine.openinfosecfoundation.org/issues/3850
5 years ago
Jason Ish
e9fec043b5
rust/util: expose function to test strings for valid UTF-8
...
rs_check_utf8 will check that the provided string is valid
UTF-8 by converting it to a Rust string and returning true
or false.
5 years ago
Jason Ish
583593aa1b
http/eve: use set_string_from_bytes where appropriate
...
The JsonBuilder set_string_from_bytes will escape unprintable
characters in the output stream. Using BytesToStringBuffer
can generate invalid UTF-8 which prevents the conversion from
a C string to a Rust string.
5 years ago
Victor Julien
d6cf4b3335
detect/dataset: error if set couldn't be fully loaded
5 years ago
Victor Julien
017c038bcb
datasets: free old data when reusing a hash container
5 years ago
Jeff Lucovsky
00f77f9643
log: Log errors while writing log info
...
This commit adds logic to log errors during output. Errors are logged
once and the number of errors is maintained.
5 years ago
Jeff Lucovsky
b9458adf8a
log: Add log output error code
5 years ago
Jeff Lucovsky
6cdd87f5ad
log: Use unlocked variants of stdio functions
...
This commit uses the unlocked variants of additional stdio functions
5 years ago
Jeff Lucovsky
3c91e14352
log: Add more stdio_unlocked macros
...
This commit adds additional macros for interfaces in stdio_unlocked
according to their local availability.
5 years ago
Victor Julien
fa0b91b18f
error: reformat enum
5 years ago
Victor Julien
fbdc776525
app-layer: handle parser return code issues more gracefully
5 years ago
Victor Julien
5155982ba5
pcap: fix minor scan-build warnings
5 years ago
Victor Julien
aac2b9dbb9
commandline: add static analyzer hint for -r parsing
5 years ago
Victor Julien
71297f575f
commandline: minor formatting fixes
5 years ago
Jeff Lucovsky
9efb936697
general: Improve grammar in error messages
...
This commit corrects a minor grammar issue in address/port error
messages.
5 years ago
Victor Julien
57a611b429
decode/geneve: add config to yaml
5 years ago
Jason Ish
8b38db4a50
github-ci: apply default CFLAGS to all builds
5 years ago
Jason Ish
280ab65705
github-ci: add test build without jansson
...
This is to cover a test from Travis CI where we make sure
that ./configure fails if libjansson is not available.
5 years ago
Jason Ish
cb963f8682
github-ci: update debian 9 test to use known Rust version
...
Choose Rust 1.39.0 as a known version of Rust that we build against
to see in CI if we build with this version, but fail with latest.
This is to cover a similar test from Travis CI.
5 years ago
Jason Ish
b698f66c27
github-ci: enable debug on Fedora 32 build
5 years ago
Jason Ish
146a1ee1d7
github-ci: check that configure fails if rust to old
...
Migration of similar test from Travis-CI.
Redmine issue:
https://redmine.openinfosecfoundation.org/issues/3869
5 years ago
Jason Ish
975b58c050
github-ci: Ubuntu 20.4 build with -NDEBUG
...
To cover Travis-CI test that builds with -NDEBUG.
Redmine issue:
https://redmine.openinfosecfoundation.org/issues/3869
5 years ago
Jason Ish
dfbd38e809
github-ci: ubuntu 20.04 build without nss/nspr
...
Adds a test that builds and tests Suricata without nss/nspr
to replace the similar test on Travis-CI.
Redmine issue:
https://redmine.openinfosecfoundation.org/issues/3869
5 years ago
Jason Ish
1ec6307d9d
github-ci: Fedora 32 builder with asan enabled
...
Also enables -Wshadow and rust-strict to cover those cases
from Travis.
Redmine issue:
https://redmine.openinfosecfoundation.org/issues/3868
5 years ago
Ali Jad Khalil
6be08637c3
decode/teredo: Modified/refactored Teredo logic
...
This is just a slight refactor to make analagous decoding/encapsulation
schemes - Geneve, Teredo, and VXLAN - be implemented as similarly as
possible.
5 years ago
Ali Jad Khalil
66452dd38a
decode/vxlan: Modified/refactored VXLAN logic
...
This is just a slight refactor to make analagous decoding/encapsulation
schemes - Geneve, Teredo, and VXLAN - be implemented as similarly as
possible.
5 years ago
Ali Jad Khalil
5d955c1836
decode/geneve: Add Geneve decoding functionality
...
These changes are in response to feature request 3063. Geneve is
very similar to VXLAN, but uses a slightly different encapsulation
scheme.
5 years ago
Simon Dugas
48da18b081
doc: dns - document additional fields in eve event
...
Documentation of additional fields for soa and sshfp. Also some minor
doc fixes and updates.
5 years ago
Simon Dugas
7f26246ce1
dns: parse and log fields for SOA record type
...
Added `dns_parse_rdata_soa` to parse SOA fields into an `DNSRDataSOA`
struct.
Added logging for answer and authority SOA records in both version
1 & 2, as well as grouped formats.
5 years ago
Simon Dugas
af498fd840
dns: use nom's rest to take all remaining rdata
...
Using nom's `rest` combinator eliminates the need to call the do_parse
macro for parsing a single element.
5 years ago
Simon Dugas
8005f50647
dns: refactor to handle more rdata formats
...
Represent rdata as `DNSRData` enum variants instead of `Vec<u8>`.
This will allow parsing/logging of more complex formats like SOA.
5 years ago
Victor Julien
77bafe13a3
decode: reformat event table
5 years ago
Jeff Lucovsky
06f41f608c
doc: Improve grammar, spelling and clarifications
...
This commit improves the overall documentation's grammar, spelling, and
adds clarifications where needed.
5 years ago
Jason Ish
665328b29e
plugins: require registration function SCPluginRegister
...
Instead of looking for a symbol, "PluginSpec" look for a function
named SCPluginRegister that returns a SCPlugin.
This makes it much easier to create Rust plugins without having
to deal with dlopen constructors and such, which is rather
straight forward in C, but a bit of advanced boilerplate in Rust
that can be eliminated by simply calling a registration function.
5 years ago
Jason Ish
647e304f4b
rust/log: minor cleanup
...
Group functions for setting and getting the log level
together.
5 years ago
Jason Ish
ea1338b464
rust: function macro now returns the function name
...
Borrow a macro from https://github.com/popzxc/stdext-rs that
will give us the Rust function name in SCLog messages in Rust.
As this trick only works on Rust 1.38 and newer, keep the old
macro around and set a feature based on a Rust version test
done during ./configure.
5 years ago
Jason Ish
bac8016d17
rust: plugin bootstrap function
...
Functions written in Rust will need to suricata::plugin::init()
to bootstrap themselves. This bootstrap process sets the log level
within the Rust address space, and hooks up function pointers
that are expected to be set during normal runs of Suricata.
5 years ago
Jason Ish
3de98b3595
rust/log: set the log level with a pure Rust function
...
Make sure the log level is setup with a pure Rust function, so
when it is set, its set within the address space of the caller.
This is important for Rust plugins where the Rust modules are not
in the address space of the Suricata main process.
5 years ago
Jason Ish
335e4e728f
suricata: expose the SuricataContext with a function
...
Expose the "SuricataContext" required by Rust as a function. During
normal startup we register this context with the Rust code, but
plugins written in Rust will need to get the same registration
done, but to do this in a plugin, the plugin code must
call and set the context within its address space.
5 years ago
Jason Ish
87a91e6aa8
logging: expose the log level with a function
...
The log level needs to exposed so Rust plugins can bootstrap
themselves with the correct login to SCLogNotice!(), etc work
as expected.
5 years ago
Jason Ish
ac93ab281d
rust/logging: allow log macros to be used by plugins
...
Fix plugin macros so they can be used by external Rust crates
such as plugins.
5 years ago