|
|
|
@ -65,8 +65,8 @@ struct MQTTUnsubscribeTopicGetDataArgs {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static InspectionBuffer *MQTTUnsubscribeTopicGetData(DetectEngineThreadCtx *det_ctx,
|
|
|
|
|
const DetectEngineTransforms *transforms,
|
|
|
|
|
Flow *f, struct MQTTUnsubscribeTopicGetDataArgs *cbdata, int list_id, bool first)
|
|
|
|
|
const DetectEngineTransforms *transforms, Flow *f,
|
|
|
|
|
struct MQTTUnsubscribeTopicGetDataArgs *cbdata, int list_id)
|
|
|
|
|
{
|
|
|
|
|
SCEnter();
|
|
|
|
|
|
|
|
|
@ -74,7 +74,7 @@ static InspectionBuffer *MQTTUnsubscribeTopicGetData(DetectEngineThreadCtx *det_
|
|
|
|
|
InspectionBufferMultipleForListGet(det_ctx, list_id, cbdata->local_id);
|
|
|
|
|
if (buffer == NULL)
|
|
|
|
|
return NULL;
|
|
|
|
|
if (!first && buffer->inspect != NULL)
|
|
|
|
|
if (buffer->initialized)
|
|
|
|
|
return buffer;
|
|
|
|
|
|
|
|
|
|
const uint8_t *data;
|
|
|
|
@ -101,8 +101,8 @@ static uint8_t DetectEngineInspectMQTTUnsubscribeTopic(DetectEngineCtx *de_ctx,
|
|
|
|
|
|
|
|
|
|
while ((unsubscribe_topic_match_limit == 0) || local_id < unsubscribe_topic_match_limit) {
|
|
|
|
|
struct MQTTUnsubscribeTopicGetDataArgs cbdata = { local_id, txv, };
|
|
|
|
|
InspectionBuffer *buffer = MQTTUnsubscribeTopicGetData(det_ctx,
|
|
|
|
|
transforms, f, &cbdata, engine->sm_list, false);
|
|
|
|
|
InspectionBuffer *buffer =
|
|
|
|
|
MQTTUnsubscribeTopicGetData(det_ctx, transforms, f, &cbdata, engine->sm_list);
|
|
|
|
|
if (buffer == NULL || buffer->inspect == NULL)
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
@ -151,8 +151,8 @@ static void PrefilterTxMQTTUnsubscribeTopic(DetectEngineThreadCtx *det_ctx, cons
|
|
|
|
|
uint32_t local_id = 0;
|
|
|
|
|
while ((unsubscribe_topic_match_limit == 0) || local_id < unsubscribe_topic_match_limit) {
|
|
|
|
|
struct MQTTUnsubscribeTopicGetDataArgs cbdata = { local_id, txv };
|
|
|
|
|
InspectionBuffer *buffer = MQTTUnsubscribeTopicGetData(det_ctx, ctx->transforms,
|
|
|
|
|
f, &cbdata, list_id, true);
|
|
|
|
|
InspectionBuffer *buffer =
|
|
|
|
|
MQTTUnsubscribeTopicGetData(det_ctx, ctx->transforms, f, &cbdata, list_id);
|
|
|
|
|
if (buffer == NULL)
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|