From 106b885d8818e812ae2cd395164a522c2a3b3d20 Mon Sep 17 00:00:00 2001 From: Juliana Fajardini Date: Tue, 30 May 2023 10:43:49 -0300 Subject: [PATCH] stream/tcp: don't accept pass-packet policy This is no longer valid for midstream exception policies. Part of Bug #5825 --- src/stream-tcp.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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; }