From 6608b9a5f3cce9fb9bfbdc2d71c87058c91c2698 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Thu, 2 Jul 2020 21:18:11 +0200 Subject: [PATCH] app-layer: set EOF flag in case of unsupported GAP If GAP is not supported set EOF flags in the parser. --- src/app-layer-parser.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app-layer-parser.c b/src/app-layer-parser.c index 2b4b6630a5..b2c11dbbb8 100644 --- a/src/app-layer-parser.c +++ b/src/app-layer-parser.c @@ -1175,7 +1175,7 @@ int AppLayerParserParse(ThreadVars *tv, AppLayerParserThreadCtx *alp_tctx, Flow #ifdef DEBUG_VALIDATION BUG_ON(f->protomap != FlowGetProtoMapping(f->proto)); #endif - AppLayerParserState *pstate = NULL; + AppLayerParserState *pstate = f->alparser; AppLayerParserProtoCtx *p = &alp_ctx.ctxs[f->protomap][alproto]; void *alstate = NULL; uint64_t p_tx_cnt = 0; @@ -1198,7 +1198,6 @@ int AppLayerParserParse(ThreadVars *tv, AppLayerParserThreadCtx *alp_tctx, Flow } /* Get the parser state (if any) */ - pstate = f->alparser; if (pstate == NULL) { f->alparser = pstate = AppLayerParserStateAlloc(); if (pstate == NULL)