Skip to content

Commit

Permalink
detect: remove unused field
Browse files Browse the repository at this point in the history
content_inspect_window is used in app-layer-smtp, but
not directly in detect-file-data
  • Loading branch information
catenacyber authored and victorjulien committed Jun 20, 2024
1 parent 3d05961 commit dc043d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/detect-file-data.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,14 @@ static void SetupDetectEngineConfig(DetectEngineCtx *de_ctx) {
for (int i = 0; i < (int)ALPROTO_MAX; i++) {
de_ctx->filedata_config[i].content_limit = FILEDATA_CONTENT_LIMIT;
de_ctx->filedata_config[i].content_inspect_min_size = FILEDATA_CONTENT_INSPECT_MIN_SIZE;
de_ctx->filedata_config[i].content_inspect_window = FILEDATA_CONTENT_INSPECT_WINDOW;
}

/* add protocol specific settings here */

/* SMTP */
de_ctx->filedata_config[ALPROTO_SMTP].content_limit = smtp_config.content_limit;
de_ctx->filedata_config[ALPROTO_SMTP].content_inspect_min_size = smtp_config.content_inspect_min_size;
de_ctx->filedata_config[ALPROTO_SMTP].content_inspect_window = smtp_config.content_inspect_window;
de_ctx->filedata_config[ALPROTO_SMTP].content_inspect_min_size =
smtp_config.content_inspect_min_size;

de_ctx->filedata_config_initialized = true;
}
Expand Down
1 change: 0 additions & 1 deletion src/detect.h
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,6 @@ typedef struct DetectEngineCtx_ {
struct {
uint32_t content_limit;
uint32_t content_inspect_min_size;
uint32_t content_inspect_window;
} filedata_config[ALPROTO_MAX];

#ifdef PROFILE_RULES
Expand Down

0 comments on commit dc043d0

Please sign in to comment.