http_cookie: register mpm from keyword

pull/2310/head
Victor Julien 9 years ago
parent 74661449e0
commit a1a2187a0c

@ -97,11 +97,6 @@ typedef struct AppLayerMpms_ {
} AppLayerMpms;
AppLayerMpms app_mpms[] = {
{ "http_cookie", 0, SIG_FLAG_TOSERVER, DETECT_SM_LIST_HCDMATCH,
PrefilterTxRequestCookieRegister, 0},
{ "http_cookie", 0, SIG_FLAG_TOCLIENT, DETECT_SM_LIST_HCDMATCH,
PrefilterTxResponseCookieRegister, 0},
{ "dns_query", 0, SIG_FLAG_TOSERVER, DETECT_SM_LIST_DNSQUERYNAME_MATCH,
PrefilterTxDnsQueryRegister, 0},

@ -58,6 +58,7 @@
#include "app-layer-htp.h"
#include "detect-http-cookie.h"
#include "detect-engine-hcd.h"
#include "stream-tcp.h"
static int DetectHttpCookieSetup (DetectEngineCtx *, Signature *, char *);
@ -80,6 +81,14 @@ void DetectHttpCookieRegister(void)
sigmatch_table[DETECT_AL_HTTP_COOKIE].flags |= SIGMATCH_NOOPT;
sigmatch_table[DETECT_AL_HTTP_COOKIE].flags |= SIGMATCH_PAYLOAD;
DetectMpmAppLayerRegister("http_cookie", SIG_FLAG_TOSERVER,
DETECT_SM_LIST_HCDMATCH,
PrefilterTxRequestCookieRegister);
DetectMpmAppLayerRegister("http_cookie", SIG_FLAG_TOCLIENT,
DETECT_SM_LIST_HCDMATCH,
PrefilterTxResponseCookieRegister);
}
/**

Loading…
Cancel
Save