From 43b281a510afb3a6a304d05aa135dd2d4f497d2b Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Sat, 17 Sep 2016 11:47:29 +0200 Subject: [PATCH] file_data: register mpm from keyword --- src/detect-engine-mpm.c | 5 ----- src/detect-file-data.c | 10 ++++++++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/detect-engine-mpm.c b/src/detect-engine-mpm.c index 7319afba73..08bb6c7fcd 100644 --- a/src/detect-engine-mpm.c +++ b/src/detect-engine-mpm.c @@ -97,11 +97,6 @@ typedef struct AppLayerMpms_ { } AppLayerMpms; AppLayerMpms app_mpms[] = { - { "file_data", 0, SIG_FLAG_TOSERVER, DETECT_SM_LIST_FILEDATA, - PrefilterTxSmtpFiledataRegister, 0}, /* smtp */ - { "file_data", 0, SIG_FLAG_TOCLIENT, DETECT_SM_LIST_FILEDATA, - PrefilterTxHttpResponseBodyRegister, 0}, /* http server body */ - { "http_stat_msg", 0, SIG_FLAG_TOCLIENT, DETECT_SM_LIST_HSMDMATCH, PrefilterTxHttpStatMsgRegister, 0}, { "http_stat_code", 0, SIG_FLAG_TOCLIENT, DETECT_SM_LIST_HSCDMATCH, diff --git a/src/detect-file-data.c b/src/detect-file-data.c index b3e18ec145..12b54cbe00 100644 --- a/src/detect-file-data.c +++ b/src/detect-file-data.c @@ -34,6 +34,9 @@ #include "detect-engine-mpm.h" #include "detect-engine-state.h" +#include "detect-engine-filedata-smtp.h" +#include "detect-engine-hsbd.h" + #include "flow.h" #include "flow-var.h" #include "flow-util.h" @@ -59,6 +62,13 @@ void DetectFiledataRegister(void) sigmatch_table[DETECT_FILE_DATA].Free = NULL; sigmatch_table[DETECT_FILE_DATA].RegisterTests = DetectFiledataRegisterTests; sigmatch_table[DETECT_FILE_DATA].flags = SIGMATCH_NOOPT; + + DetectMpmAppLayerRegister("file_data", SIG_FLAG_TOSERVER, + DETECT_SM_LIST_FILEDATA, + PrefilterTxSmtpFiledataRegister); + DetectMpmAppLayerRegister("file_data", SIG_FLAG_TOCLIENT, + DETECT_SM_LIST_FILEDATA, + PrefilterTxHttpResponseBodyRegister); } /**