]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
app-layer: optimize inspection id tracking
authorVictor Julien <victor@inliniac.net>
Thu, 5 Dec 2019 14:31:28 +0000 (15:31 +0100)
committerVictor Julien <victor@inliniac.net>
Mon, 9 Dec 2019 19:12:03 +0000 (20:12 +0100)
Increase the inspect id for a completely inspected tx in any case.
This avoids re-evaluating transactions.

Reported-by: Ilya Bakhtin
src/app-layer-parser.c

index b7de5c0f40399c815fcfb574e4b63d68cdc4c1d7..660289e66d3acfca9b85bf654608d245e7ed4c79 100644 (file)
@@ -795,9 +795,9 @@ void AppLayerParserSetTransactionInspectId(const Flow *f, AppLayerParserState *p
                         tx, idx, flags & STREAM_TOSERVER ? "toserver" : "toclient", detect_flags);
             }
         }
+        idx++;
         if (!ires.has_next)
             break;
-        idx++;
     }
     pstate->inspect_id[direction] = idx;
     SCLogDebug("inspect_id now %"PRIu64, pstate->inspect_id[direction]);