From: Nikos Mavrogiannopoulos Date: Sat, 23 Aug 2014 15:28:59 +0000 (+0200) Subject: record: in DTLS discard only messages that cause unexpected packet errors X-Git-Tag: gnutls_3_4_0~1040 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=da6090885b22b5cede08c06a81ea3339faa5107e;p=thirdparty%2Fgnutls.git record: in DTLS discard only messages that cause unexpected packet errors --- diff --git a/lib/gnutls_record.c b/lib/gnutls_record.c index 46d73238e1..5562202c84 100644 --- a/lib/gnutls_record.c +++ b/lib/gnutls_record.c @@ -1365,7 +1365,11 @@ _gnutls_recv_in_buffers(gnutls_session_t session, content_type_t type, return 0; } - if (IS_DTLS(session)) { + if (IS_DTLS(session) && (ret == GNUTLS_E_DECRYPTION_FAILED || + ret == GNUTLS_E_UNSUPPORTED_VERSION_PACKET || + ret == GNUTLS_E_UNEXPECTED_PACKET_LENGTH || + ret == GNUTLS_E_UNEXPECTED_PACKET || + ret == GNUTLS_E_UNEXPECTED_HANDSHAKE_PACKET)) { goto discard; }