smtp: check if we have a current transaction

Ticket: 4948

This is not the perfect solution, but it prevents to trigger
the assert, and keep the assert.
A better solution would need to create transaction from
the reponse parsing, in case a later command was buffered and
not answered. But this would not be enough as NoNewTx prevents
the creation of a new transaction for RSET...
pull/6911/head
Philippe Antoine 4 years ago committed by Victor Julien
parent 11d3af551b
commit 4247605d87

@ -939,7 +939,7 @@ static int SMTPProcessReply(SMTPState *state, Flow *f,
SMTPSetEvent(state, SMTP_DECODER_EVENT_DATA_COMMAND_REJECTED);
}
} else if (IsReplyToCommand(state, SMTP_COMMAND_RSET)) {
if (reply_code == SMTP_REPLY_250 &&
if (reply_code == SMTP_REPLY_250 && state->curr_tx &&
!(state->parser_state & SMTP_PARSER_STATE_PARSING_MULTILINE_REPLY)) {
SMTPTransactionComplete(state);
}

Loading…
Cancel
Save