From 357c9a68f292aaa463a2fcde06929e8b7a02e11d Mon Sep 17 00:00:00 2001 From: Juliusz Sosinowicz Date: Thu, 24 Aug 2023 19:25:11 +0200 Subject: [PATCH] Only drop plaintext msgs when we don't have stuff to rtx --- src/internal.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/internal.c b/src/internal.c index 2233635f5..2324598c5 100644 --- a/src/internal.c +++ b/src/internal.c @@ -20011,9 +20011,10 @@ static int HandleDTLSDecryptFailed(WOLFSSL* ssl) static int DtlsShouldDrop(WOLFSSL* ssl, int retcode) { - if (ssl->options.handShakeDone && !IsEncryptionOn(ssl, 0)) { + if (ssl->options.handShakeDone && !IsEncryptionOn(ssl, 0) && + !ssl->options.dtlsHsRetain) { WOLFSSL_MSG("Silently dropping plaintext DTLS message " - "on established connection."); + "on established connection when we have nothing to send."); return 1; }