]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
smtp: use rule_id mpm support instead of pattern id
authorVictor Julien <victor@inliniac.net>
Mon, 12 Oct 2015 08:14:25 +0000 (10:14 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 5 Apr 2016 07:30:10 +0000 (09:30 +0200)
src/app-layer-smtp.c

index 8ef3a966ccafd8e778ae115979fc488c0121632f..b7450af9dc78c5298fe69a8d984db6eec6cdd1f7 100644 (file)
@@ -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);