From b31617c0604390e3184fb8737043a08b54e8f604 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Thu, 9 Feb 2023 16:52:53 +0100 Subject: [PATCH] stream: reduce scope of inline drop check --- src/stream-tcp.c | 9 ++++----- src/stream-tcp.h | 1 - 2 files changed, 4 insertions(+), 6 deletions(-) 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); -- 2.47.2