exceptions: ignore policy if stream.midstream=true

Set the engine to ignore the stream.midstream-policy if stream.midstream
is enabled.

If we had both stream.midstream AND stream.midstream_policy enabled,
this could lead to midstream flows being dropped (or bypassed, or...)
instead of being accepted by the engine, as it was probably meant when
the user enabled midstream flows.

Bug #5765
pull/8430/head
Juliana Fajardini 3 years ago committed by Victor Julien
parent 0d9289014b
commit 8e9905e0d8

@ -470,6 +470,11 @@ void StreamTcpInitConfig(bool quiet)
stream_config.reassembly_memcap_policy = stream_config.reassembly_memcap_policy =
ExceptionPolicyParse("stream.reassembly.memcap-policy", true); ExceptionPolicyParse("stream.reassembly.memcap-policy", true);
stream_config.midstream_policy = ExceptionPolicyParse("stream.midstream-policy", true); stream_config.midstream_policy = ExceptionPolicyParse("stream.midstream-policy", true);
if (stream_config.midstream && stream_config.midstream_policy != EXCEPTION_POLICY_NOT_SET) {
SCLogWarning("stream.midstream_policy setting conflicting with stream.midstream enabled. "
"Ignoring stream.midstream_policy.");
stream_config.midstream_policy = EXCEPTION_POLICY_NOT_SET;
}
if (!quiet) { if (!quiet) {
SCLogConfig("stream.\"inline\": %s", SCLogConfig("stream.\"inline\": %s",

Loading…
Cancel
Save