From: Victor Julien Date: Sun, 7 Feb 2021 08:00:49 +0000 (+0100) Subject: detect/analyzer: fix pkt engine display X-Git-Tag: suricata-6.0.2~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63065934e853ac3ec4d113bab57f20ad78da8ae4;p=thirdparty%2Fsuricata.git detect/analyzer: fix pkt engine display (cherry picked from commit 52692da7cf9f66a979bac24f38efd5ce2767d066) --- diff --git a/src/detect-engine.c b/src/detect-engine.c index 9ed9e3620c..c6bca16cef 100644 --- a/src/detect-engine.c +++ b/src/detect-engine.c @@ -1479,14 +1479,14 @@ bool DetectEnginePktInspectionRun(ThreadVars *tv, /** * \param data pointer to SigMatchData. Allowed to be NULL. */ -static int DetectEnginePktInspectionAppend(Signature *s, - InspectionBufferPktInspectFunc Callback, - SigMatchData *data) +static int DetectEnginePktInspectionAppend(Signature *s, InspectionBufferPktInspectFunc Callback, + SigMatchData *data, const int list_id) { DetectEnginePktInspectionEngine *e = SCCalloc(1, sizeof(*e)); if (e == NULL) return -1; + e->sm_list = list_id; e->v1.Callback = Callback; e->smd = data; @@ -1506,15 +1506,15 @@ int DetectEnginePktInspectionSetup(Signature *s) { /* only handle PMATCH here if we're not an app inspect rule */ if (s->sm_arrays[DETECT_SM_LIST_PMATCH] && (s->init_data->init_flags & SIG_FLAG_INIT_STATE_MATCH) == 0) { - if (DetectEnginePktInspectionAppend(s, DetectEngineInspectRulePayloadMatches, - NULL) < 0) + if (DetectEnginePktInspectionAppend( + s, DetectEngineInspectRulePayloadMatches, NULL, DETECT_SM_LIST_PMATCH) < 0) return -1; SCLogDebug("sid %u: DetectEngineInspectRulePayloadMatches appended", s->id); } if (s->sm_arrays[DETECT_SM_LIST_MATCH]) { - if (DetectEnginePktInspectionAppend(s, DetectEngineInspectRulePacketMatches, - NULL) < 0) + if (DetectEnginePktInspectionAppend( + s, DetectEngineInspectRulePacketMatches, NULL, DETECT_SM_LIST_MATCH) < 0) return -1; SCLogDebug("sid %u: DetectEngineInspectRulePacketMatches appended", s->id); }