ftp: FTPGetAlstateProgress for done port commands

For a done transaction with command PORT,
we expect FTP_STATE_FINISHED
and we got FTP_STATE_PORT_DONE instead
which prevented logging of these transactions

We change the order of the evaluations to get the right result
pull/4839/head
Philippe Antoine 5 years ago committed by Victor Julien
parent 699d6682da
commit 6f36403219

@ -996,13 +996,13 @@ static int FTPGetAlstateProgress(void *vtx, uint8_t direction)
SCLogDebug("tx %p", vtx); SCLogDebug("tx %p", vtx);
FTPTransaction *tx = vtx; FTPTransaction *tx = vtx;
if (direction == STREAM_TOSERVER && if (!tx->done) {
tx->command_descriptor->command == FTP_COMMAND_PORT) { if (direction == STREAM_TOSERVER &&
return FTP_STATE_PORT_DONE; tx->command_descriptor->command == FTP_COMMAND_PORT) {
} return FTP_STATE_PORT_DONE;
}
if (!tx->done)
return FTP_STATE_IN_PROGRESS; return FTP_STATE_IN_PROGRESS;
}
return FTP_STATE_FINISHED; return FTP_STATE_FINISHED;
} }

Loading…
Cancel
Save