From: Philippe Antoine Date: Wed, 14 Jul 2021 17:40:42 +0000 (+0200) Subject: smtp: completes RSET transaction on last multiline X-Git-Tag: suricata-5.0.8~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad1ac6619cd7324fb7c6c1edd369a005c6415aba;p=thirdparty%2Fsuricata.git smtp: completes RSET transaction on last multiline Ticket: #4561 (cherry picked from commit f44bbbb9ada39893279965a98831620074205871) --- diff --git a/src/app-layer-smtp.c b/src/app-layer-smtp.c index 083a8398a0..87809db24d 100644 --- a/src/app-layer-smtp.c +++ b/src/app-layer-smtp.c @@ -1059,7 +1059,8 @@ 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->parser_state & SMTP_PARSER_STATE_PARSING_MULTILINE_REPLY)) { SMTPTransactionComplete(state); } } else {