diff --git a/rust/src/ftp/constant.rs b/rust/src/ftp/constant.rs index f9ea4fde8f..94bea4f5c8 100644 --- a/rust/src/ftp/constant.rs +++ b/rust/src/ftp/constant.rs @@ -19,9 +19,7 @@ #[repr(u8)] #[allow(non_camel_case_types)] pub enum FtpStateValues { - FTP_STATE_NONE, FTP_STATE_IN_PROGRESS, - FTP_STATE_PORT_DONE, FTP_STATE_FINISHED, } // FTP Data progress values diff --git a/src/app-layer-ftp.c b/src/app-layer-ftp.c index 4823b5a2d6..1265355ed8 100644 --- a/src/app-layer-ftp.c +++ b/src/app-layer-ftp.c @@ -889,11 +889,11 @@ static int FTPGetAlstateProgress(void *vtx, uint8_t direction) SCLogDebug("tx %p", vtx); FTPTransaction *tx = vtx; + /* having a tx implies request side is done */ + if (direction == STREAM_TOSERVER) { + return FTP_STATE_FINISHED; + } if (!tx->done) { - if (direction == STREAM_TOSERVER && - tx->command_descriptor.command_code == FTP_COMMAND_PORT) { - return FTP_STATE_PORT_DONE; - } return FTP_STATE_IN_PROGRESS; }