Skip to content

Commit

Permalink
stream/tcp: don't accept pass-packet policy
Browse files Browse the repository at this point in the history
This is no longer valid for midstream exception policies.

Part of
Bug OISF#5825
  • Loading branch information
jufajardini authored and victorjulien committed Jun 13, 2023
1 parent 69d3750 commit 106b885
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/stream-tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 106b885

Please sign in to comment.