]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
record: in DTLS discard only messages that cause unexpected packet errors
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 23 Aug 2014 15:28:59 +0000 (17:28 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 23 Aug 2014 15:28:59 +0000 (17:28 +0200)
lib/gnutls_record.c

index 46d73238e164ff20370af817adacfb20766e1f49..5562202c843b52ea0456b407f73e3ec51bc70b9b 100644 (file)
@@ -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;
        }