diff --git a/src/detect-engine.c b/src/detect-engine.c index da8a4a8234..5b82b68b00 100644 --- a/src/detect-engine.c +++ b/src/detect-engine.c @@ -47,7 +47,6 @@ #include "detect-engine-uri.h" #include "detect-engine-hrhd.h" #include "detect-engine-file.h" -#include "detect-engine-modbus.h" #include "detect-engine-template.h" #include "detect-engine.h" @@ -123,10 +122,6 @@ void DetectEngineRegisterAppInspectionEngines(void) { ALPROTO_SMTP, DETECT_SM_LIST_FILEMATCH, DetectFileInspectSmtp }, - /* Modbus */ - { ALPROTO_MODBUS, - DETECT_SM_LIST_MODBUS_MATCH, - DetectEngineInspectModbus }, /* Template. */ { ALPROTO_TEMPLATE, DETECT_SM_LIST_TEMPLATE_BUFFER_MATCH, @@ -137,10 +132,6 @@ void DetectEngineRegisterAppInspectionEngines(void) { ALPROTO_HTTP, DETECT_SM_LIST_FILEMATCH, DetectFileInspectHttp }, - /* Modbus */ - { ALPROTO_MODBUS, - DETECT_SM_LIST_MODBUS_MATCH, - DetectEngineInspectModbus }, /* Template. */ { ALPROTO_TEMPLATE, DETECT_SM_LIST_TEMPLATE_BUFFER_MATCH, diff --git a/src/detect-modbus.c b/src/detect-modbus.c index fe585f6d12..b426b4b2c8 100644 --- a/src/detect-modbus.c +++ b/src/detect-modbus.c @@ -45,8 +45,10 @@ #include "detect.h" #include "detect-parse.h" +#include "detect-engine.h" #include "detect-modbus.h" +#include "detect-engine-modbus.h" #include "util-debug.h" @@ -412,11 +414,16 @@ void DetectModbusRegister(void) &function_parse_regex, &function_parse_regex_study); DetectSetupParseRegexes(PARSE_REGEX_ACCESS, &access_parse_regex, &access_parse_regex_study); + + DetectAppLayerInspectEngineRegister(ALPROTO_MODBUS, SIG_FLAG_TOSERVER, + DETECT_SM_LIST_MODBUS_MATCH, + DetectEngineInspectModbus); + DetectAppLayerInspectEngineRegister(ALPROTO_MODBUS, SIG_FLAG_TOCLIENT, + DETECT_SM_LIST_MODBUS_MATCH, + DetectEngineInspectModbus); } #ifdef UNITTESTS /* UNITTESTS */ -#include "detect-engine.h" - #include "util-unittest.h" /** \test Signature containing a function. */