Commit Graph

11 Commits (d0f3f2d4628d6b5d42d5b9a6317d009e3e9d8127)

Author SHA1 Message Date
Philippe Antoine 20423fdd38 style: remove some useless return
and remove empty line before end of function
2 years ago
Victor Julien 68804b8c4b decode/tcp: move tcph into L4 packet data
To reduce Packet size.

Ticket: #6938.
2 years ago
Victor Julien cca912e9b3 decode/tcp: add and use PacketIsTCP inline func
To prepare future changes to the Packet header pointers.

Ticket: #5517.
2 years ago
Victor Julien 2001ddc583 decode: use macro's instead of direct ptr checks
To prepare future changes to the Packet header pointers.

Ticket: #5517.
2 years ago
Victor Julien 2c0e434bb8 detect: pass de_ctx to DetectBufferSetActiveList 3 years ago
Victor Julien 13cebb1857 detect: fix heap overflow issue with buffer setup
In some cases, the InspectionBufferGet function would be followed by
a failure to set the buffer up, for example due to a HTTP body limit
not yet being reached. Yet each call to InspectionBufferGet would lead
to the matching list_id to be added to the
DetectEngineThreadCtx::inspect.to_clear_queue. This array is sized to
add each list only once, but in this case the same id could be added
multiple times, potentially overflowing the array.
6 years ago
Philippe Antoine 445e03d752 detect: null sanity checks for pkthdr
Even when the rules are only applied on traffic with the protocol
the structure for the protocol header can be set to NULL if there
was an error parsing the header
6 years ago
Victor Julien 26bcc97515 detect/keywords: dynamic version part of doc URL 6 years ago
Victor Julien 367e3e1895 detect/tcp/udp: minor cleanups 7 years ago
Victor Julien 4dff903b35 detect: introduce pkt mpm engines
Instead of the hardcode L4 matching in MPM that was recently introduced,
add an API similar to the AppLayer MPM and inspect engines.

Share part of the registration code with the AppLayer.

Implement for the tcp.hdr and udp.hdr keywords.
7 years ago
Victor Julien 35be8385eb detect: tcp.hdr sticky buffer
Sticky buffer to inspect the TCP header.
7 years ago