From e4059fb541202964a54d56a38f261591e9d79a7f Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 9 Mar 2016 13:21:45 +0100 Subject: [PATCH] stream: fix stream.inline default If stream.inline setting was missing it would default to IDS. This patch changes the default to 'auto', meaning that in IPS mode the stream engine also uses IPS mode and in IDS mode it's still in IDS mode. Bug #1570 --- src/stream-tcp.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/stream-tcp.c b/src/stream-tcp.c index 80d1b8dffd..9ccb6a2940 100644 --- a/src/stream-tcp.c +++ b/src/stream-tcp.c @@ -422,11 +422,10 @@ void StreamTcpInitConfig(char quiet) "enabled" : "disabled"); } - int inl = 0; - - char *temp_stream_inline_str; if (ConfGet("stream.inline", &temp_stream_inline_str) == 1) { + int inl = 0; + /* checking for "auto" and falling back to boolean to provide * backward compatibility */ if (strcmp(temp_stream_inline_str, "auto") == 0) { @@ -438,6 +437,13 @@ void StreamTcpInitConfig(char quiet) } else if (ConfGetBool("stream.inline", &inl) == 1) { stream_inline = inl; } + } else { + /* default to 'auto' */ + if (EngineModeIsIPS()) { + stream_inline = 1; + } else { + stream_inline = 0; + } } if (!quiet) { -- 2.47.2