detect/mpm: don't register engines for disabled protocols

pull/15846/head
Victor Julien 1 month ago
parent 3b6b381f90
commit af1c72c37e

@ -28,6 +28,7 @@
#include "suricata-common.h"
#include "app-layer-protos.h"
#include "app-layer-parser.h"
#include "decode.h"
#include "detect.h"
@ -95,6 +96,12 @@ static void RegisterInternal(const char *name, int direction, int priority,
SCLogDebug("registering %s/%d/%d/%p/%p/%u/%d", name, direction, priority,
PrefilterRegister, GetData, alproto, tx_min_progress);
if (!AppLayerParserIsEnabled(alproto)) {
SCLogDebug("%s is disabled", AppProtoToString(alproto));
return;
}
SCLogDebug("%s is enabled", AppProtoToString(alproto));
BUG_ON(tx_min_progress >= 48);
// must register GetData with PrefilterGenericMpmRegister

Loading…
Cancel
Save