]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect/flag: Pseudo pkt "flush log" flag
authorJeff Lucovsky <jlucovsky@oisf.net>
Sat, 7 Oct 2023 21:06:52 +0000 (17:06 -0400)
committerVictor Julien <victor@inliniac.net>
Wed, 26 Feb 2025 09:30:41 +0000 (10:30 +0100)
Issue: 3449

Add a flush directive to the packet that is distinct from the existing
"log flush" flag as the new flag is to distinguish between the 2 use
cases.

src/decode.h

index c74a94cc637448f7312b2ed28c8ecdf1f047c0c0..2206b39a84c5b9abc0939a250a95078b77c4fd6b 100644 (file)
@@ -1315,9 +1315,12 @@ void DecodeUnregisterCounters(void);
 #define PKT_FIRST_ALERTS BIT_U32(29)
 #define PKT_FIRST_TAG    BIT_U32(30)
 
+#define PKT_PSEUDO_LOG_FLUSH BIT_U32(31) /**< Detect/log flush for protocol upgrade */
+
 /** \brief return 1 if the packet is a pseudo packet */
 #define PKT_IS_PSEUDOPKT(p) \
     ((p)->flags & (PKT_PSEUDO_STREAM_END|PKT_PSEUDO_DETECTLOG_FLUSH))
+#define PKT_IS_FLUSHPKT(p) ((p)->flags & (PKT_PSEUDO_LOG_FLUSH))
 
 #define PKT_SET_SRC(p, src_val) ((p)->pkt_src = src_val)