Skip to content

Commit

Permalink
mysql: fix register parser bug
Browse files Browse the repository at this point in the history
Task #3446
  • Loading branch information
QianKaiLin committed Oct 9, 2024
1 parent 0b8543f commit c0a363d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions rust/src/mysql/mysql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1124,6 +1124,7 @@ pub unsafe extern "C" fn rs_mysql_register_parser() {
SCLogError!("Invalid value for mysql.max-tx");
}
}
AppLayerParserRegisterLogger(IPPROTO_TCP, ALPROTO_MYSQL);
} else {
SCLogDebug!("Protocol detector and parser disabled for MYSQL.");
}
Expand Down
1 change: 1 addition & 0 deletions src/app-layer-parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -1732,6 +1732,7 @@ void AppLayerParserRegisterProtocolParsers(void)
RegisterHTTP2Parsers();
rs_telnet_register_parser();
RegisterIMAPParsers();
rs_mysql_register_parser();

/** POP3 */
AppLayerProtoDetectRegisterProtocol(ALPROTO_POP3, "pop3");
Expand Down
2 changes: 1 addition & 1 deletion src/app-layer-protos.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ enum AppProtoEnum {
ALPROTO_HTTP2,
ALPROTO_BITTORRENT_DHT,
ALPROTO_POP3,
ALPROTO_MYSQL,

// signature-only (ie not seen in flow)
// HTTP for any version (ALPROTO_HTTP1 (version 1) or ALPROTO_HTTP2)
ALPROTO_HTTP,
ALPROTO_MYSQL,

/* used by the probing parser when alproto detection fails
* permanently for that particular stream */
Expand Down

0 comments on commit c0a363d

Please sign in to comment.