From: Nikos Mavrogiannopoulos Date: Thu, 10 Nov 2011 08:23:11 +0000 (+0100) Subject: dropped packets are also reported on gnutls_deinit() to ensure that they are not... X-Git-Tag: gnutls_3_0_8~35 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=41a73fb4a147dc4773d4b546d5d8b5cfdae255d9;p=thirdparty%2Fgnutls.git dropped packets are also reported on gnutls_deinit() to ensure that they are not lost. --- diff --git a/lib/gnutls_state.c b/lib/gnutls_state.c index 3c12508cc5..43602cc340 100644 --- a/lib/gnutls_state.c +++ b/lib/gnutls_state.c @@ -425,6 +425,10 @@ gnutls_deinit (gnutls_session_t session) if (session == NULL) return; + if (IS_DTLS(session) && session->internals.dtls.packets_dropped > 0) + _gnutls_audit_log(session, "Discarded %u messages (duplicates or invalid decryption)\n", + (unsigned int)session->internals.dtls.packets_dropped); + /* remove auth info firstly */ _gnutls_free_auth_info (session);