Skip to content

Commit

Permalink
smtp: check if there is a transaction to close
Browse files Browse the repository at this point in the history
Ticket: 4948

When parsing the response for starttls
  • Loading branch information
catenacyber authored and victorjulien committed Mar 25, 2022
1 parent 68fa080 commit 99b3443
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app-layer-smtp.c
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,9 @@ static int SMTPProcessReply(SMTPState *state, Flow *f,
/* we are entering STARRTTLS data mode */
state->parser_state |= SMTP_PARSER_STATE_COMMAND_DATA_MODE;
AppLayerRequestProtocolTLSUpgrade(f);
SMTPTransactionComplete(state);
if (state->curr_tx) {
SMTPTransactionComplete(state);
}
} else {
/* decoder event */
SMTPSetEvent(state, SMTP_DECODER_EVENT_TLS_REJECTED);
Expand Down

0 comments on commit 99b3443

Please sign in to comment.