]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
pgsql: add case for Unknown response message state
authorJuliana Fajardini <jufajardini@gmail.com>
Mon, 17 Feb 2025 15:06:39 +0000 (12:06 -0300)
committerVictor Julien <victor@inliniac.net>
Wed, 19 Feb 2025 08:21:37 +0000 (09:21 +0100)
No state change, but since we added Unknown responses, we should handle
that case -- should we have a specific state for such cases?

Related to
Bug #5524
Task #5566

rust/src/pgsql/pgsql.rs

index 513e24cf7ea9fbbc9b360b198741f063d1e2ca6d..b1b8f87c691ce90451dbd0a6bbafc9fd91828807 100644 (file)
@@ -291,7 +291,7 @@ impl PgsqlState {
                 Some(PgsqlStateProgress::ConnectionTerminated)
             }
             PgsqlFEMessage::UnknownMessageType(_) => {
-                SCLogDebug!("Match: Unknown message type");
+                SCLogDebug!("Match: Unknown request message type");
                 // Not changing state when we don't know the message
                 None
             }
@@ -496,6 +496,11 @@ impl PgsqlState {
                 // query was sent with what we received here?
                 Some(PgsqlStateProgress::CommandCompletedReceived)
             }
+            PgsqlBEMessage::UnknownMessageType(_) => {
+                SCLogDebug!("Match: Unknown response message type");
+                // Not changing state when we don't know the message
+                None
+            }
             PgsqlBEMessage::ErrorResponse(_) => Some(PgsqlStateProgress::ErrorMessageReceived),
             _ => {
                 // We don't always have to change current state when we see a response...