From 4e1945415273bf58876c5da43c506af71ff5b6bc Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Mon, 31 Jul 2023 21:54:45 +0200 Subject: [PATCH] ftp: reenable debug check; improve debug log --- src/app-layer-ftp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/app-layer-ftp.c b/src/app-layer-ftp.c index c22c39c134..3db4482790 100644 --- a/src/app-layer-ftp.c +++ b/src/app-layer-ftp.c @@ -1067,8 +1067,7 @@ static AppLayerResult FTPDataParse(Flow *f, FtpDataState *ftpdata_state, } else { if (ftpdata_state->state == FTPDATA_STATE_FINISHED) { SCLogDebug("state is already finished"); - // TODO put back the assert after deciding on the bug... - // DEBUG_VALIDATE_BUG_ON(input_len); // data after state finished is a bug. + DEBUG_VALIDATE_BUG_ON(input_len); // data after state finished is a bug. SCReturnStruct(APP_LAYER_OK); } if ((direction & ftpdata_state->direction) == 0) { @@ -1099,7 +1098,7 @@ static AppLayerResult FTPDataParse(Flow *f, FtpDataState *ftpdata_state, if (eof) { ret = FileCloseFile(ftpdata_state->files, &sbcfg, NULL, 0, flags); ftpdata_state->state = FTPDATA_STATE_FINISHED; - SCLogDebug("closed because of eof"); + SCLogDebug("closed because of eof: state now FTPDATA_STATE_FINISHED"); } out: if (ret < 0) {