Commit Graph

40 Commits (cc59c567f7f23ddf1bb03e3b09f88928bc80da6a)

Author SHA1 Message Date
Philippe Antoine cc59c567f7 nfs: bound requestmap
Add to the hashmap only if there is not too many items in in

Ticket: 8418

(cherry picked from commit a50f494ef6)
2 months ago
Victor Julien ee7ed99b6f rust: spelling 3 years ago
Jason Ish 64cb687a65 rust: suppress specific manual_flatten list
In this case of debug code, the explicit iterator seems to make more
sense.
4 years ago
Jason Ish 7080ecbb76 rust: remove explicit lifetimes where not needed 4 years ago
Jason Ish e7f5bd047d rust: fix needless borrows of references
Fixed automatically by cargo clippy --fix.
4 years ago
Victor Julien 6cc9811edd files: move FileContainer into FileTransferTracker
Update SMB, NFS, HTTP2.
4 years ago
Victor Julien 4bfeac6591 nfs: file handling cleanups 4 years ago
Jason Ish c026d8531b rust/clippy: fix lint: match_ref_pats 4 years ago
Jason Ish f15ffbc869 rust/clippy: fix lint: single_match
Allow this lint in some cases where a match statement adds clarity.
4 years ago
Philippe Antoine bc287018e5 rust: cargo clippy --all-features --fix --allow-no-vcs 4 years ago
Kristina Jefferson 9cd00424c3 rust: fix lint warnings about ptr_arg
Ticket: #4599
4 years ago
Jason Ish f0952aef0d rust: fix clippy lints for unneeded reference in debug code 4 years ago
Jason Ish 5f7ba03e63 rust: fix clippy lints for clippy::needless_bool 4 years ago
Jason Ish f342d4aacd rust: fix clippy lints for clippy::len_zero 4 years ago
Victor Julien 79499e4769 app-layer: move files into transactions
Update APIs to store files in transactions instead of the per flow state.

Goal is to avoid the overhead of matching up files and transactions in
cases where there are many of both.

Update all protocol implementations to support this.

Update file logging logic to account for having files in transactions. Instead
of it acting separately on file containers, it is now tied into the
transaction logging.

Update the filestore keyword to consider a match if filestore output not
enabled.
4 years ago
Pierre Chifflier beadd090b8 rust: upgrade versions of BER/DER, Kerberos and SNMP parsers 4 years ago
Philippe Antoine 95f0424423 nfs4: fix write record handling
Ticket: #5280
4 years ago
Pierre Chifflier 0ffe123330 rust/nfs: convert parser to nom7 functions (NFS v3 and v4 records) 5 years ago
Shivani Bhardwaj 11c438a07d nfs: use Direction enum 5 years ago
Victor Julien 67759795c6 nfs: don't reuse file transactions
After a file has been closed (CLOSE, COMMIT command or EOF/SYNC part of
READ/WRITE data block) mark it as such so that new file commands on that
file do not reuse the transaction.

When a file transfer is completed it will be flagged as such and not be
found anymore by the NFSState::get_file_tx_by_handle() method. This forces
a new transaction to be created.
5 years ago
Jason Ish 69cf5c9eea rust(lint): remove needless borrows
These are needless borrows (references) as the item is already
a reference.
5 years ago
Philippe Antoine ef5755338f rust: SCLogDebug is real nop when built as release
Before, even if there were no outputs, all the arguments
were evaluated, which could turn expensive

All variables which are used only in certain build configurations
are now prefixed by underscore to avoid warnings
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.
6 years ago
Victor Julien 66598f9ce7 nfs: switch to AppLayerResult 6 years ago
Victor Julien 6ae66cb2bb nfs: code cleanups
Use 'if let' to replace simple 'match' statements.

Use explicit returns to easy code review.
6 years ago
Victor Julien 74305c0486 rust/nfs: minor code cleanups 6 years ago
Pierre Chifflier 442500678b rust: use the streaming version of combinators to fix incomplete reads 6 years ago
Pierre Chifflier 1ab8c5763c rust: add SecBlobError custom error type for the Kerberos parser 6 years ago
Pierre Chifflier 5b809f77f1 rust: upgrade all parsers to nom 5 6 years ago
Jason Ish 42e5065ab8 rust: update to Rust 2018 with cargo fix
Migrate to Rust 2018 edition.

Credit to Danny Browning for first demontrating this:
https://github.com/OISF/suricata/pull/3604/commits
7 years ago
Victor Julien 3f6624bf16 rust: remove libc crate dependency
Use std::os::raw instead.
7 years ago
Pierre Chifflier 13b7399790 rust: upgrade all parsers to nom4 8 years ago
Victor Julien c6e79f4410 nfs4: create tx for CREATE procedure 8 years ago
Victor Julien cb3abba1e0 nfs4: log remove procedure + add multi-proc support
Add TX creation for NFS4 transactions. Start with the 'REMOVE' procedure.

Start on logging all procs. In NFS4 COMPOUND records there are multiple
procedures. One of them can be considered the 'main' procedure, with others
as supporting utility. This patch adds the first step in supporting to
track those in the TX for logging and inspection.
8 years ago
Victor Julien ff518e5c64 nfs4: for putrootfh set 'mount root' as name 8 years ago
Victor Julien 8a1af5c367 nfs4: remove panic calls, set events instead 8 years ago
Victor Julien 73d94fff73 nfs4: support records wrapped in GSSAPI integrity 8 years ago
Victor Julien 39489bc5fd nfs4: implement COMMIT parsing and handling 8 years ago
Victor Julien c7cb01b636 nfs4: parse GSSAPI init 8 years ago
Victor Julien 06f6c15954 nfs4: initial implementation
Implements record parsing and file extraction for READs and WRITEs.

Defines all types from RFC 7530.
8 years ago