Skip to content

Commit

Permalink
mysql: add handhsake protocol link in state and change probe
Browse files Browse the repository at this point in the history
  • Loading branch information
QianKaiLin committed Sep 26, 2024
1 parent 445e9b9 commit d869398
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rust/src/mysql/mysql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ pub enum MysqlStateProgress {

// Connection Phase
// Server send HandshakeRequest to Client
// https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_connection_phase.html
Handshake,
// Client send HandshakeResponse to Server
// Server send AuthSwitchRequest to Client
Expand Down Expand Up @@ -876,7 +877,7 @@ pub unsafe extern "C" fn rs_mysql_probing_ts(
) -> AppProto {
if input_len >= 1 && !input.is_null() {
let slice: &[u8] = build_slice!(input, input_len as usize);
match parse_packet_header(slice) {
match parse_handshake_response(slice) {
Ok(_) => return ALPROTO_MYSQL,
Err(nom7::Err::Incomplete(_)) => return ALPROTO_UNKNOWN,
Err(err) => {
Expand Down

0 comments on commit d869398

Please sign in to comment.