Only drop plaintext msgs when we don't have stuff to rtx

This commit is contained in:
Juliusz Sosinowicz
2023-08-24 19:25:11 +02:00
parent 6e3c3577f5
commit 357c9a68f2

View File

@ -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;
}