From: Victor Julien Date: Fri, 10 Jun 2022 08:34:47 +0000 (+0200) Subject: detect/filestore: clean up stream flag handling X-Git-Tag: suricata-7.0.0-beta1~433 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=046287c2b5e4f34b9c8e21a0af88d58f5c19c295;p=thirdparty%2Fsuricata.git detect/filestore: clean up stream flag handling --- diff --git a/src/detect-filestore.c b/src/detect-filestore.c index 2e53572f56..d7077c59c9 100644 --- a/src/detect-filestore.c +++ b/src/detect-filestore.c @@ -198,8 +198,6 @@ static int FilestorePostMatchWithOptions(Packet *p, Flow *f, const DetectFilesto static int DetectFilestorePostMatch(DetectEngineThreadCtx *det_ctx, Packet *p, const Signature *s, const SigMatchCtx *ctx) { - uint8_t flags = 0; - SCEnter(); if (det_ctx->filestore_cnt == 0) { @@ -219,11 +217,8 @@ static int DetectFilestorePostMatch(DetectEngineThreadCtx *det_ctx, TcpSession *ssn = (TcpSession *)p->flow->protoctx; TcpSessionSetReassemblyDepth(ssn, FileReassemblyDepth()); } - if (p->flowflags & FLOW_PKT_TOCLIENT) - flags |= STREAM_TOCLIENT; - else - flags |= STREAM_TOSERVER; + const uint8_t flags = STREAM_FLAGS_FOR_PACKET(p); for (uint16_t u = 0; u < det_ctx->filestore_cnt; u++) { AppLayerParserSetStreamDepthFlag(p->flow->proto, p->flow->alproto, FlowGetAppState(p->flow),