|
|
|
@ -45,11 +45,9 @@ static int DetectMQTTConnackSessionPresentSetup (DetectEngineCtx *, Signature *,
|
|
|
|
|
void MQTTConnackSessionPresentRegisterTests(void);
|
|
|
|
|
void DetectMQTTConnackSessionPresentFree(DetectEngineCtx *de_ctx, void *);
|
|
|
|
|
|
|
|
|
|
static int DetectEngineInspectMQTTConnackSessionPresentGeneric(ThreadVars *tv,
|
|
|
|
|
DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx,
|
|
|
|
|
const Signature *s, const SigMatchData *smd,
|
|
|
|
|
Flow *f, uint8_t flags, void *alstate,
|
|
|
|
|
void *txv, uint64_t tx_id);
|
|
|
|
|
static int DetectEngineInspectMQTTConnackSessionPresentGeneric(DetectEngineCtx *de_ctx,
|
|
|
|
|
DetectEngineThreadCtx *det_ctx, const struct DetectEngineAppInspectionEngine_ *engine,
|
|
|
|
|
const Signature *s, Flow *f, uint8_t flags, void *alstate, void *txv, uint64_t tx_id);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* \brief Registration function for mqtt.connack.session_present: keyword
|
|
|
|
@ -68,21 +66,18 @@ void DetectMQTTConnackSessionPresentRegister (void)
|
|
|
|
|
|
|
|
|
|
DetectSetupParseRegexes(PARSE_REGEX, &parse_regex);
|
|
|
|
|
|
|
|
|
|
DetectAppLayerInspectEngineRegister("mqtt.connack.session_present",
|
|
|
|
|
ALPROTO_MQTT, SIG_FLAG_TOSERVER, 1,
|
|
|
|
|
DetectEngineInspectMQTTConnackSessionPresentGeneric);
|
|
|
|
|
DetectAppLayerInspectEngineRegister2("mqtt.connack.session_present", ALPROTO_MQTT,
|
|
|
|
|
SIG_FLAG_TOSERVER, 1, DetectEngineInspectMQTTConnackSessionPresentGeneric, NULL);
|
|
|
|
|
|
|
|
|
|
mqtt_connack_session_present_id = DetectBufferTypeGetByName("mqtt.connack.session_present");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int DetectEngineInspectMQTTConnackSessionPresentGeneric(ThreadVars *tv,
|
|
|
|
|
DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx,
|
|
|
|
|
const Signature *s, const SigMatchData *smd,
|
|
|
|
|
Flow *f, uint8_t flags, void *alstate,
|
|
|
|
|
void *txv, uint64_t tx_id)
|
|
|
|
|
static int DetectEngineInspectMQTTConnackSessionPresentGeneric(DetectEngineCtx *de_ctx,
|
|
|
|
|
DetectEngineThreadCtx *det_ctx, const struct DetectEngineAppInspectionEngine_ *engine,
|
|
|
|
|
const Signature *s, Flow *f, uint8_t flags, void *alstate, void *txv, uint64_t tx_id)
|
|
|
|
|
{
|
|
|
|
|
return DetectEngineInspectGenericList(tv, de_ctx, det_ctx, s, smd,
|
|
|
|
|
f, flags, alstate, txv, tx_id);
|
|
|
|
|
return DetectEngineInspectGenericList(
|
|
|
|
|
NULL, de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -315,4 +310,4 @@ void MQTTConnackSessionPresentRegisterTests(void)
|
|
|
|
|
UtRegisterTest("MQTTConnackSessionPresentTestParse03", MQTTConnackSessionPresentTestParse03);
|
|
|
|
|
UtRegisterTest("MQTTConnackSessionPresentTestParse04", MQTTConnackSessionPresentTestParse04);
|
|
|
|
|
#endif /* UNITTESTS */
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|