From: Victor Julien Date: Fri, 13 Dec 2024 09:35:13 +0000 (+0100) Subject: stream: rename tcp reuse flag X-Git-Tag: suricata-8.0.0-beta1~595 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dbebd89de211c89c28ac4e5595cdb21da6ff51ee;p=thirdparty%2Fsuricata.git stream: rename tcp reuse flag Rename to be consistent with other naming: STREAM_PKT_FLAG_TCP_PORT_REUSE -> STREAM_PKT_FLAG_TCP_SESSION_REUSE --- diff --git a/src/flow-hash.c b/src/flow-hash.c index 95f55b9e0a..38b4adab91 100644 --- a/src/flow-hash.c +++ b/src/flow-hash.c @@ -791,7 +791,7 @@ static Flow *TcpReuseReplace(ThreadVars *tv, FlowLookupStruct *fls, FlowBucket * f->thread_id[0] = thread_id[0]; f->thread_id[1] = thread_id[1]; - STREAM_PKT_FLAG_SET(p, STREAM_PKT_FLAG_TCP_PORT_REUSE); + STREAM_PKT_FLAG_SET(p, STREAM_PKT_FLAG_TCP_SESSION_REUSE); return f; } diff --git a/src/output-eve-stream.c b/src/output-eve-stream.c index 72cd196641..3059f25181 100644 --- a/src/output-eve-stream.c +++ b/src/output-eve-stream.c @@ -157,7 +157,7 @@ static OutputInitResult EveStreamLogInitCtxSub(ConfNode *conf, OutputCtx *parent ctx->trigger_flags |= SetFlag(conf, "state-update", STREAM_PKT_FLAG_STATE_UPDATE); ctx->trigger_flags |= SetFlag(conf, "spurious-retransmission", STREAM_PKT_FLAG_SPURIOUS_RETRANSMISSION); - ctx->trigger_flags |= SetFlag(conf, "tcp-session-reuse", STREAM_PKT_FLAG_TCP_PORT_REUSE); + ctx->trigger_flags |= SetFlag(conf, "tcp-session-reuse", STREAM_PKT_FLAG_TCP_SESSION_REUSE); ctx->trigger_flags |= SetFlag(conf, "all", 0xFFFF); SCLogDebug("trigger_flags %04x", ctx->trigger_flags); @@ -369,8 +369,8 @@ static int EveStreamLogger(ThreadVars *tv, void *thread_data, const Packet *p) jb_append_string(js, "dsack"); if (p->l4.vars.tcp.stream_pkt_flags & STREAM_PKT_FLAG_ACK_UNSEEN_DATA) jb_append_string(js, "ack_unseen_data"); - if (p->l4.vars.tcp.stream_pkt_flags & STREAM_PKT_FLAG_TCP_PORT_REUSE) - jb_append_string(js, "tcp_port_reuse"); + if (p->l4.vars.tcp.stream_pkt_flags & STREAM_PKT_FLAG_TCP_SESSION_REUSE) + jb_append_string(js, "tcp_session_reuse"); if (p->l4.vars.tcp.stream_pkt_flags & STREAM_PKT_FLAG_TCP_ZERO_WIN_PROBE) jb_append_string(js, "zero_window_probe"); if (p->l4.vars.tcp.stream_pkt_flags & STREAM_PKT_FLAG_TCP_ZERO_WIN_PROBE_ACK) diff --git a/src/stream-tcp-private.h b/src/stream-tcp-private.h index e186221137..e87508695b 100644 --- a/src/stream-tcp-private.h +++ b/src/stream-tcp-private.h @@ -319,7 +319,7 @@ typedef struct TcpSession_ { #define STREAM_PKT_FLAG_DUP_ACK BIT_U16(7) #define STREAM_PKT_FLAG_DSACK BIT_U16(8) #define STREAM_PKT_FLAG_ACK_UNSEEN_DATA BIT_U16(9) -#define STREAM_PKT_FLAG_TCP_PORT_REUSE BIT_U16(10) +#define STREAM_PKT_FLAG_TCP_SESSION_REUSE BIT_U16(10) #define STREAM_PKT_FLAG_TCP_ZERO_WIN_PROBE BIT_U16(11) #define STREAM_PKT_FLAG_TCP_ZERO_WIN_PROBE_ACK BIT_U16(12)