From: Victor Julien Date: Thu, 9 Feb 2023 15:52:53 +0000 (+0100) Subject: stream: reduce scope of inline drop check X-Git-Tag: suricata-7.0.0-rc2~585 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b31617c0604390e3184fb8737043a08b54e8f604;p=thirdparty%2Fsuricata.git stream: reduce scope of inline drop check --- diff --git a/src/stream-tcp.c b/src/stream-tcp.c index 9d57789a41..59b0155f69 100644 --- a/src/stream-tcp.c +++ b/src/stream-tcp.c @@ -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)); diff --git a/src/stream-tcp.h b/src/stream-tcp.h index c652a785b4..733961d2be 100644 --- a/src/stream-tcp.h +++ b/src/stream-tcp.h @@ -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);