]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
stream: reduce scope of inline drop check
authorVictor Julien <vjulien@oisf.net>
Thu, 9 Feb 2023 15:52:53 +0000 (16:52 +0100)
committerVictor Julien <vjulien@oisf.net>
Thu, 9 Feb 2023 16:38:10 +0000 (17:38 +0100)
src/stream-tcp.c
src/stream-tcp.h

index 9d57789a410327369d1038bf2b7ee1a99f6ced3a..59b0155f69dff8484bc62263bcaa983e6b630d1a 100644 (file)
@@ -325,13 +325,12 @@ static void StreamTcpSessionPoolCleanup(void *s)
     }
 }
 
-/**
+/** \internal
  *  \brief See if stream engine is dropping invalid packet in inline mode
- *
- *  \retval 0 no
- *  \retval 1 yes
+ *  \retval false no
+ *  \retval true yes
  */
-int StreamTcpInlineDropInvalid(void)
+static inline bool StreamTcpInlineDropInvalid(void)
 {
     return ((stream_config.flags & STREAMTCP_INIT_FLAG_INLINE)
             && (stream_config.flags & STREAMTCP_INIT_FLAG_DROP_INVALID));
index c652a785b407e96a9347e64640b28a9c857ee6b0..733961d2be8247b1fb427a6c30a0c2ad5785b964 100644 (file)
@@ -200,7 +200,6 @@ void StreamTcpSessionCleanup(TcpSession *ssn);
 void StreamTcpStreamCleanup(TcpStream *stream);
 /* check if bypass is enabled */
 int StreamTcpBypassEnabled(void);
-int StreamTcpInlineDropInvalid(void);
 int StreamTcpInlineMode(void);
 
 int TcpSessionPacketSsnReuse(const Packet *p, const Flow *f, const void *tcp_ssn);