From ddcf47eadda21d97537ef1fc3d8f2d30711fbfad Mon Sep 17 00:00:00 2001 From: John Safranek Date: Mon, 2 May 2016 15:18:08 -0700 Subject: [PATCH] when dropping a DTLS message, drop the whole datagram --- src/internal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/internal.c b/src/internal.c index 8694c2329..649ae522f 100755 --- a/src/internal.c +++ b/src/internal.c @@ -8039,7 +8039,8 @@ int ProcessReply(WOLFSSL* ssl) if (ssl->options.dtls && ret == SEQUENCE_ERROR) { WOLFSSL_MSG("Silently dropping out of order DTLS message"); ssl->options.processReply = doProcessInit; - ssl->buffers.inputBuffer.idx += ssl->curSize; + ssl->buffers.inputBuffer.length = 0; + ssl->buffers.inputBuffer.idx = 0; ret = DtlsPoolSend(ssl); if (ret != 0)