From: Victor Julien Date: Mon, 31 Jul 2023 19:54:45 +0000 (+0200) Subject: ftp: reenable debug check; improve debug log X-Git-Tag: suricata-7.0.1~65 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e1945415273bf58876c5da43c506af71ff5b6bc;p=thirdparty%2Fsuricata.git ftp: reenable debug check; improve debug log --- 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) {