From: Victor Julien Date: Wed, 8 Feb 2023 19:02:09 +0000 (+0100) Subject: eve/flow: optimize tcp gap checks X-Git-Tag: suricata-7.0.0-rc2~589 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89f3346c3c18ac785a5e32760dd847fd35f06e3d;p=thirdparty%2Fsuricata.git eve/flow: optimize tcp gap checks --- diff --git a/src/output-json-flow.c b/src/output-json-flow.c index f1aaaee172..a52e20eb28 100644 --- a/src/output-json-flow.c +++ b/src/output-json-flow.c @@ -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"); }