]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
eve/flow: optimize tcp gap checks
authorVictor Julien <vjulien@oisf.net>
Wed, 8 Feb 2023 19:02:09 +0000 (20:02 +0100)
committerVictor Julien <vjulien@oisf.net>
Thu, 9 Feb 2023 16:38:10 +0000 (17:38 +0100)
src/output-json-flow.c

index f1aaaee1727fd0d5f5e939fc3ed3a9199492c9db..a52e20eb28b363b2d86f42ea02024389993e3024 100644 (file)
@@ -305,10 +305,10 @@ static void EveFlowLogJSON(OutputJsonThreadCtx *aft, JsonBuilder *jb, Flow *f)
             const char *tcp_state = StreamTcpStateAsString(ssn->state);
             if (tcp_state != NULL)
                 jb_set_string(jb, "state", tcp_state);
-            if (FlowHasGaps(f, STREAM_TOCLIENT)) {
+            if (ssn->server.flags & STREAMTCP_STREAM_FLAG_HAS_GAP) {
                 JB_SET_TRUE(jb, "tc_gap");
             }
-            if (FlowHasGaps(f, STREAM_TOSERVER)) {
+            if (ssn->client.flags & STREAMTCP_STREAM_FLAG_HAS_GAP) {
                 JB_SET_TRUE(jb, "ts_gap");
             }