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 prefilter events 6291 v1.1 #11337

Closed
Closed
Show file tree
Hide file tree
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
11 changes: 8 additions & 3 deletions src/detect-engine-build.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include "detect-flow.h"
#include "detect-config.h"
#include "detect-flowbits.h"
#include "app-layer-events.h"

#include "util-port-interval-tree.h"
#include "util-profiling.h"
Expand Down Expand Up @@ -420,7 +421,8 @@ PacketCreateMask(Packet *p, SignatureMask *mask, AppProto alproto,
(*mask) |= SIG_MASK_REQUIRE_NO_PAYLOAD;
}

if (p->events.cnt > 0 || app_decoder_events != 0 || p->app_layer_events != NULL) {
if (p->events.cnt > 0 || app_decoder_events != 0 ||
(p->app_layer_events != NULL && p->app_layer_events->cnt)) {
SCLogDebug("packet/flow has events set");
(*mask) |= SIG_MASK_REQUIRE_ENGINE_EVENT;
}
Expand Down Expand Up @@ -534,9 +536,12 @@ static int SignatureCreateMask(Signature *s)
}
break;
}
case DETECT_DECODE_EVENT:
// fallthrough
case DETECT_STREAM_EVENT:
// fallthrough
case DETECT_AL_APP_LAYER_EVENT:
s->mask |= SIG_MASK_REQUIRE_ENGINE_EVENT;
break;
// fallthrough
case DETECT_ENGINE_EVENT:
s->mask |= SIG_MASK_REQUIRE_ENGINE_EVENT;
break;
Expand Down
1 change: 0 additions & 1 deletion src/source-af-packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ static int AFPBypassCallback(Packet *p);
static int AFPXDPBypassCallback(Packet *p);
#endif

#define MAX_MAPS 32
/**
* \brief Structure to hold thread specific variables.
*/
Expand Down
Loading