diff --git a/src/app-layer-smtp.c b/src/app-layer-smtp.c index 2b1af6aa4dbc..6c4016f4f6f3 100644 --- a/src/app-layer-smtp.c +++ b/src/app-layer-smtp.c @@ -846,11 +846,8 @@ static int SMTPProcessReply(SMTPState *state, Flow *f, /* reply but not a command we have stored, fall through */ } else if (state->cmds[state->cmds_idx] == SMTP_COMMAND_STARTTLS) { if (reply_code == SMTP_REPLY_220) { - /* we are entering STARRTTLS data mode */ - state->parser_state |= SMTP_PARSER_STATE_COMMAND_DATA_MODE; - AppLayerParserStateSetFlag(pstate, - APP_LAYER_PARSER_NO_INSPECTION | - APP_LAYER_PARSER_NO_REASSEMBLY); + /* we reset the alproto */ + AppLayerAskReset(f, 1); } else { /* decoder event */ SMTPSetEvent(state, SMTP_DECODER_EVENT_TLS_REJECTED);