Commit Graph

10747 Commits (8a643c893c4cae61a22e343f1b910461dd110a54)
 

Author SHA1 Message Date
Victor Julien f5045af3e3 runmodes: code cleanups 5 years ago
Victor Julien 1a8562b3c6 detect: clean up threads handling
Clean up reload and break loop thread handling.
5 years ago
Victor Julien e5010d7704 detect: inject packet cleanup 5 years ago
Victor Julien abea227cfc flow-manager: code cleanups 5 years ago
Victor Julien 6fd35fb786 flow-manager: avoid doubly signaling threads
Don't try to wake up the threads we just flagged and validated that
they changed their state.
5 years ago
Victor Julien 539c1a275f threading: remove commented out function 5 years ago
Victor Julien b55f617c2f threading: optimize and unify post_pq checks
TmThreadsSlotProcessPkt did not need to look all 'slots' as only the first
slots post_pq can have been used.

Unify post_pq cleanup handling.
5 years ago
Victor Julien 2a1ed3ba1b threading: remove wrong unlikely statement; minor cleanups 5 years ago
Victor Julien e5192ae20a threading: TmSlot::SlotFunc does not need to be atomic 5 years ago
Victor Julien 89048d71ad threading: fix flags handling by using uint32_t everywhere 5 years ago
Victor Julien 85cf341189 threading: optimize error handling in main packet loop 5 years ago
Victor Julien 9d8ea3b4fe threading: minor code style cleanups 5 years ago
Victor Julien b1056b3836 threading: simplify packetpool checks 5 years ago
Victor Julien 603b2ced47 threading/queues: add shortcut for packetpool check
Allows code simplifycation in the threading loops.
5 years ago
Victor Julien 29cb9d1d52 threading/queues: minor code cleanups 5 years ago
Victor Julien f05c12b70f afl: fix compilation 5 years ago
Victor Julien 01862eae78 afl/decoder: make file dumps optional 5 years ago
Victor Julien 42d112e7b6 detect/address: dead code removal and style cleanups 5 years ago
Victor Julien d41aeccea4 smb: handle file transactions post-GAP
After a GAP all normal transactions are closed. File transactions
are left open as they can handle GAPs in principle. However, the
GAP might have contained the closing of a file and therefore it
may remain active until the end of the flow.

This patch introduces a time based heuristic for these transactions.
After the GAP all file transactions are stamped with the current
timestamp. If 60 seconds later a file has seen no update, its marked
as closed.

This is meant to fix resource starvation issues observed in long
running SMB sessions where packet loss was causing GAPs.
5 years ago
Jason Ish 80cafb2979 flow: expose last time as a function
This function returns the individual components
of the timeval in output pointers making it suitable
for use over Rust FFI.
5 years ago
Jason Ish d1eab5aa46 defrag: set livedev on the reassembled packet (issue-3380)
Set the livedev on reassembled packets to that of the parent
packet. Fixes issues with multidetect, specifically a segfault
as reported in issue 3380.

Bug #3380.
5 years ago
Victor Julien 9ae87e79a2 configure: fix cygpath check 5 years ago
Victor Julien 9d0976ea8a output/tx: split list of loggers per alproto
This patch splits the list of loggers the tx logging walks into lists per
alproto. The list was getting longer with each eve addition. The result
was that for each tx we would have to loop through multiple loggers that
did not apply to this tx as it was for the wrong protocol.
5 years ago
Victor Julien 5b7aa506c1 output: micro optimization
LogFunc is always set, so don't check for it at runtime.
5 years ago
Victor Julien 4f9e4d41e0 output: optimize root logging loop
Instead of unconditionally looping all the 'root' loggers, loop only
those that are in use.

Root loggers are: packet, tx, file, filedata, streaming.
5 years ago
Victor Julien 07df1ce6af output: clarify registration 5 years ago
Victor Julien 284c3cf68a output/tx: bail early if no flow 5 years ago
Victor Julien ed99e9204f output: fatal error if root logger alloc fails 5 years ago
Jason Ish 1e741641a6 rust: make clean fixups
For make clean, only remove gen/ if cbindgen is available.
This prevents make clean from remove gen when the headers
were bundled, but cbindgen is not available to remove them.

Unconditionally remove gen and vendor in maintainerclean.
5 years ago
Jason Ish 0a1d2fcec3 github-ci: test make after make clean
On the CentOS 7 build, test a make after a make clean. Should
catch the case where bundled generated headers files get deleted
when cbindgen is not available to rebuild them.
5 years ago
Jason Ish 53aaa82deb rust: set edition to 2018 5 years ago
Jason Ish e68dfa46a6 rust: cargo fix for Rust 2018 edition 5 years ago
Jason Ish 56528a38dd github-ci: add .cargo/bin to path on cbindgen install
And remove cbindgen from builds that use the distribution
archive.
5 years ago
Jason Ish 5fbe020585 rust/cbindgen: Revert Makefile to a more pre-cbindgen state
The modifications as part of the cbindgen commit caused issues
with distcheck, revert the Makefile to how it was with the Python
generator, but still using cbindgen.

Also always assume we'll include the generated headers in the
distribution archive to fix make distcheck from distribution
archives with headers included, but no cbindgen.
5 years ago
Danny Browning b573c16dd5 build: cbindgen
Rust headers are now generated using cbindgen. If cbindgen is present, they can
be generated during dist, otherwise they will be available for builds.
5 years ago
Jason Ish 593da166bb version: starting work on 6.0.0
Bump version to 6.0.0-dev.
5 years ago
Victor Julien 2c050187a3 streaming/api: fix overlap check
In some cases a SBB could be seen as overlapping with the requested
offset, when it was in fact precisely before it. In some special cases
this could lead to the stream engine not progressing the 'raw' progress.
5 years ago
Victor Julien 0f41cf3d74 debug/validation: check tcp/app-layer data lengths 5 years ago
Victor Julien a742c86741 stream: improve app-layer data retrieval with GAPs
Don't assume that the next block after the sbb head is after the
requested offset.

If the next block was before the offset, the returned data_len
would underflow and return a nonsense value to the app-layer.

Bug #2993.
5 years ago
Jeff Lucovsky ed2f6ac64b modbus: Correct typo 5 years ago
Jeff Lucovsky d4428d94de modbus: Update correct TX flags 5 years ago
Jeff Lucovsky 6c2cdbb5f0 analysis: exit if table entries are stale
This commit causes Suricata to exit when a buffer from the analyzer
table is not recognized.

Since the table must match what's registered, exiting will bring noticed
to the condition.
5 years ago
Victor Julien ce0ae81d95 rust: fix vendor use on MinGW 5 years ago
Jason Ish 57b683233d rust: Don't use --frozen during build.
If sources are vendored, we get the same effect of using frozen
with a lock file, and the Cargo.lock is generated based
on the vendored sources.

This also removes the need to ship a Cargo.lock.

Fixed out of source builds with vendored sources.
5 years ago
Jason Ish c6f168eb98 rust/Makefile: Don't include Cargo.toml
There is no need to include Cargo.toml in the distribution,
it is always generated from Cargo.toml.in during
./configure.
5 years ago
Jason Ish 2ff963db16 github-ci: do distcheck on fedora 31 build
There were no distchecks being done on builds from git.
5 years ago
Jason Ish 83630015b9 github-ci: make distcheck on centos 7 build
Tests distcheck on a build from a distribution archive.
5 years ago
Shivani Bhardwaj 700eebaecc doc/conf: Update copyright and regex for version
Make the new regex in compliance with the modern autoconf syntax.
Closes redmine ticket #3423
5 years ago
jason taylor 1666bc0ad1 doc: minor capitalization fix
Signed-off-by: jason taylor <jtfas90@gmail.com>
5 years ago
jason taylor 4f7dc4f136 doc: add bsize documentation and rule example
Signed-off-by: jason taylor <jtfas90@gmail.com>
5 years ago