]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Enable tracing of datagrams we have sent
authorMatt Caswell <matt@openssl.org>
Mon, 8 May 2023 10:32:04 +0000 (11:32 +0100)
committerMatt Caswell <matt@openssl.org>
Wed, 24 May 2023 11:18:33 +0000 (12:18 +0100)
Extend the tracing capability to also trace when we have a datagram to the
peer.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20914)

ssl/quic/quic_record_tx.c

index 9040f2f904b625015208266b391687c606f74707..748b4c358c5a2ac1146d8eded3dab4c3fc71729a 100644 (file)
@@ -910,8 +910,14 @@ int ossl_qtx_flush_net(OSSL_QTX *qtx)
         /*
          * Remove everything which was successfully sent from the pending queue.
          */
-        for (i = 0; i < wr; ++i)
+        for (i = 0; i < wr; ++i) {
+            if (qtx->msg_callback != NULL)
+                qtx->msg_callback(1, OSSL_QUIC1_VERSION, SSL3_RT_QUIC_DATAGRAM,
+                                msg[i].data, msg[i].data_len,
+                                qtx->msg_callback_s,
+                                qtx->msg_callback_arg);
             qtx_pending_to_free(qtx);
+        }
 
         total_written += wr;
     }