From cd8283bb729c4437f6a532b80c0b62d75ee8b76e Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Mon, 12 Oct 2015 10:14:25 +0200 Subject: [PATCH] smtp: use rule_id mpm support instead of pattern id --- src/app-layer-smtp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app-layer-smtp.c b/src/app-layer-smtp.c index 8ef3a966cc..b7450af9dc 100644 --- a/src/app-layer-smtp.c +++ b/src/app-layer-smtp.c @@ -925,7 +925,7 @@ static int SMTPProcessReply(SMTPState *state, Flow *f, state->current_line[0], state->current_line[1], state->current_line[2]); SCReturnInt(-1); } - reply_code = smtp_reply_map[pmq->pattern_id_array[0]].enum_value; + reply_code = smtp_reply_map[pmq->rule_id_array[0]].enum_value; if (state->cmds_idx == state->cmds_cnt) { if (!(state->parser_state & SMTP_PARSER_STATE_FIRST_REPLY_SEEN)) { @@ -1445,7 +1445,7 @@ static void SMTPSetMpmState(void) /* The third argument is 3, because reply code is always 3 bytes. */ MpmAddPatternCI(smtp_mpm_ctx, (uint8_t *)map->enum_name, 3, 0 /* defunct */, 0 /* defunct */, - i /* pattern id */, 0, 0 /* no flags */); + i /* pattern id */, i /* rule id */ , 0 /* no flags */); } mpm_table[SMTP_MPM].Prepare(smtp_mpm_ctx);