From: Anoop Saldanha Date: Sun, 1 Sep 2013 10:14:52 +0000 (+0530) Subject: fix for #925. X-Git-Tag: suricata-2.0beta2~388 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=49dcb0ca846cfa2661a25aa5f626904b2900e6da;p=thirdparty%2Fsuricata.git fix for #925. Log sensible error message when the user doesn't supply a value for stream.prealloc-sessions or when the values supplied in invalid and the engine resorts to using a default. --- diff --git a/src/stream-tcp.c b/src/stream-tcp.c index a4b5cb14bb..b9442bf31c 100644 --- a/src/stream-tcp.c +++ b/src/stream-tcp.c @@ -347,10 +347,16 @@ void StreamTcpInitConfig(char quiet) if ((ConfGetInt("stream.prealloc-sessions", &value)) == 1) { stream_config.prealloc_sessions = (uint32_t)value; } else { - if (RunmodeIsUnittests()) + if (RunmodeIsUnittests()) { stream_config.prealloc_sessions = 128; - else + } else { stream_config.prealloc_sessions = STREAMTCP_DEFAULT_PREALLOC; + if (ConfGetNode("stream.prealloc-sessions") != NULL) { + WarnInvalidConfEntry("stream.prealloc_sessions", + "%"PRIu32, + stream_config.prealloc_sessions); + } + } } if (!quiet) { SCLogInfo("stream \"prealloc-sessions\": %"PRIu32" (per thread)",