From 53dde1dafe90dcf3c34d1aca297cad656a70c77e Mon Sep 17 00:00:00 2001 From: Marco Oliverio Date: Thu, 14 Jul 2022 10:25:29 +0200 Subject: [PATCH] dtls12: async: store the message only if async is really used --- src/internal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/internal.c b/src/internal.c index c0f7a9fa1..ae470ae2e 100644 --- a/src/internal.c +++ b/src/internal.c @@ -15848,7 +15848,8 @@ static int DoDtlsHandShakeMsg(WOLFSSL* ssl, byte* input, word32* inOutIdx, /* In async mode always store the message and process it with * DtlsMsgDrain because in case of a WC_PENDING_E it will be * easier this way. */ - if (ssl->dtls_rx_msg_list_sz < DTLS_POOL_SZ) { + if (ssl->devId != INVALID_DEVID && + ssl->dtls_rx_msg_list_sz < DTLS_POOL_SZ) { DtlsMsgStore(ssl, ssl->keys.curEpoch, ssl->keys.dtls_peer_handshake_number, input + idx, size, type,