From: Victor Julien Date: Wed, 9 Mar 2016 12:21:45 +0000 (+0100) Subject: stream: fix stream.inline default X-Git-Tag: suricata-3.0.1RC1~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4059fb541202964a54d56a38f261591e9d79a7f;p=thirdparty%2Fsuricata.git 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 --- 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) {