From: Juliana Fajardini Date: Tue, 30 May 2023 13:43:49 +0000 (-0300) Subject: stream/tcp: don't accept pass-packet policy X-Git-Tag: suricata-7.0.0-rc2~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=106b885d8818e812ae2cd395164a522c2a3b3d20;p=thirdparty%2Fsuricata.git stream/tcp: don't accept pass-packet policy This is no longer valid for midstream exception policies. Part of Bug #5825 --- diff --git a/src/stream-tcp.c b/src/stream-tcp.c index 0f1c2df534..99dcd29953 100644 --- a/src/stream-tcp.c +++ b/src/stream-tcp.c @@ -963,8 +963,7 @@ static int StreamTcpPacketStateNone( return -1; } if (!(stream_config.midstream_policy == EXCEPTION_POLICY_NOT_SET || - stream_config.midstream_policy == EXCEPTION_POLICY_PASS_FLOW || - stream_config.midstream_policy == EXCEPTION_POLICY_PASS_PACKET)) { + stream_config.midstream_policy == EXCEPTION_POLICY_PASS_FLOW)) { StreamTcpSetEvent(p, STREAM_FIN_BUT_NO_SESSION); SCLogDebug("FIN packet received, no session setup"); return -1; @@ -1059,8 +1058,7 @@ static int StreamTcpPacketStateNone( return 0; } if (!(stream_config.midstream_policy == EXCEPTION_POLICY_NOT_SET || - stream_config.midstream_policy == EXCEPTION_POLICY_PASS_FLOW || - stream_config.midstream_policy == EXCEPTION_POLICY_PASS_PACKET)) { + stream_config.midstream_policy == EXCEPTION_POLICY_PASS_FLOW)) { SCLogDebug("Midstream policy not permissive, so won't pick up a session"); return 0; } @@ -1232,8 +1230,7 @@ static int StreamTcpPacketStateNone( return 0; } if (!(stream_config.midstream_policy == EXCEPTION_POLICY_NOT_SET || - stream_config.midstream_policy == EXCEPTION_POLICY_PASS_FLOW || - stream_config.midstream_policy == EXCEPTION_POLICY_PASS_PACKET)) { + stream_config.midstream_policy == EXCEPTION_POLICY_PASS_FLOW)) { SCLogDebug("Midstream policy not permissive, so won't pick up a session"); return 0; }