|
|
|
@ -186,7 +186,13 @@ JsonBuilder *JsonBuildFileInfoRecord(const Packet *p, const File *ff, void *tx,
|
|
|
|
|
jb_set_string(js, "app_proto", AppProtoToString(p->flow->alproto));
|
|
|
|
|
|
|
|
|
|
jb_open_object(js, "fileinfo");
|
|
|
|
|
EveFileInfo(js, ff, tx_id, stored);
|
|
|
|
|
if (stored) {
|
|
|
|
|
// the file has just been stored on disk cf OUTPUT_FILEDATA_FLAG_CLOSE
|
|
|
|
|
// but the flag is not set until the loggers have been called
|
|
|
|
|
EveFileInfo(js, ff, tx_id, ff->flags | FILE_STORED);
|
|
|
|
|
} else {
|
|
|
|
|
EveFileInfo(js, ff, tx_id, ff->flags);
|
|
|
|
|
}
|
|
|
|
|
jb_close(js);
|
|
|
|
|
|
|
|
|
|
/* xff header */
|
|
|
|
@ -206,8 +212,7 @@ static void FileWriteJsonRecord(JsonFileLogThread *aft, const Packet *p, const F
|
|
|
|
|
{
|
|
|
|
|
HttpXFFCfg *xff_cfg = aft->filelog_ctx->xff_cfg != NULL ? aft->filelog_ctx->xff_cfg
|
|
|
|
|
: aft->filelog_ctx->parent_xff_cfg;
|
|
|
|
|
JsonBuilder *js = JsonBuildFileInfoRecord(
|
|
|
|
|
p, ff, tx, tx_id, ff->flags & FILE_STORED ? true : false, dir, xff_cfg, eve_ctx);
|
|
|
|
|
JsonBuilder *js = JsonBuildFileInfoRecord(p, ff, tx, tx_id, false, dir, xff_cfg, eve_ctx);
|
|
|
|
|
if (unlikely(js == NULL)) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|