From f44bbbb9ada39893279965a98831620074205871 Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Wed, 14 Jul 2021 19:40:42 +0200 Subject: [PATCH] smtp: completes RSET transaction on last multiline Bug: #4561. --- src/app-layer-smtp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app-layer-smtp.c b/src/app-layer-smtp.c index e8dc4d585f..bb116ecc0e 100644 --- a/src/app-layer-smtp.c +++ b/src/app-layer-smtp.c @@ -1060,7 +1060,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 {