]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
ftp: reenable debug check; improve debug log
authorVictor Julien <vjulien@oisf.net>
Mon, 31 Jul 2023 19:54:45 +0000 (21:54 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 1 Aug 2023 17:43:04 +0000 (19:43 +0200)
src/app-layer-ftp.c

index c22c39c134b2d8b8eda77829776d48b8272d33b5..3db448279073205f277862821a5d5935bbcfad16 100644 (file)
@@ -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) {