]> git.ipfire.org Git - thirdparty/suricata.git/commit
detect: reset signature groups when reversing flow
authorPhilippe Antoine <pantoine@oisf.net>
Tue, 25 Feb 2025 09:49:41 +0000 (10:49 +0100)
committerVictor Julien <victor@inliniac.net>
Fri, 7 Mar 2025 06:01:56 +0000 (07:01 +0100)
commitd74bc774b75bcca613e5f48d907a425c3b46056a
treec0b5a94c90f9eb10f87893f9c83431669f046163
parent6477b31199a3b57f5273a43aebe2a6f0dbd5ecfc
detect: reset signature groups when reversing flow

Ticket: 7552

When we use midstream, and the first packet we see of a flow is
a response from server, and we want to match on some signature
to client :
- we had first set sgh_toserver/FLOW_SGH_TOSERVER as we first
  thought this was a packet to server
- we then swap/reverse the flow, so sgh_toclient becomes sgh_toserver
  but it contains signatures to server and cannot match our
  to_client signature

The detect engine with DetectRunSetup will set again the
signatures group heads properly
src/app-layer.c