Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

detect: log app-layer metadata in alert with single tx #12153

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/detect.c
Original file line number Diff line number Diff line change
Expand Up @@ -814,9 +814,11 @@ static inline void DetectRulePacketRules(

uint64_t txid = PACKET_ALERT_NOTX;
if ((alert_flags & PACKET_ALERT_FLAG_STREAM_MATCH) ||
(s->alproto != ALPROTO_UNKNOWN && pflow->proto == IPPROTO_UDP)) {
(s->alproto != ALPROTO_UNKNOWN && pflow->proto == IPPROTO_UDP) ||
AppLayerParserGetTxCnt(pflow, pflow->alstate) == 1) {
// if there is a stream match (TCP), or
// a UDP specific app-layer signature,
// or only one transaction
// try to use the good tx for the packet direction
if (pflow->alstate) {
uint8_t dir =
Expand Down
Loading