]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
app-layer: set EOF flag in case of unsupported GAP
authorVictor Julien <victor@inliniac.net>
Thu, 2 Jul 2020 19:18:11 +0000 (21:18 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 7 Jul 2020 08:30:43 +0000 (10:30 +0200)
If GAP is not supported set EOF flags in the parser.

src/app-layer-parser.c

index 2b4b6630a56c5be6e8a5bce2e3b9154571e0fa02..b2c11dbbb859da950eee07008e01b9b651716464 100644 (file)
@@ -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)