From a9f25402031e8864c9a07dd69d6b96a7281928dd Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Thu, 2 Jul 2020 21:58:48 +0200 Subject: [PATCH] flow-timeout: set app-layer EOF flag --- src/flow-timeout.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/flow-timeout.c b/src/flow-timeout.c index f21f3fe9eb..335ec9bf3d 100644 --- a/src/flow-timeout.c +++ b/src/flow-timeout.c @@ -248,6 +248,16 @@ static inline Packet *FlowForceReassemblyPseudoPacketSetup(Packet *p, memset(&p->ts, 0, sizeof(struct timeval)); TimeGet(&p->ts); + if (direction == 0) { + if (f->alparser && !STREAM_HAS_SEEN_DATA(&ssn->client)) { + AppLayerParserStateSetFlag(f->alparser, APP_LAYER_PARSER_EOF_TS); + } + } else { + if (f->alparser && !STREAM_HAS_SEEN_DATA(&ssn->server)) { + AppLayerParserStateSetFlag(f->alparser, APP_LAYER_PARSER_EOF_TC); + } + } + return p; error: