Commit be9fd7be9b for openssl.org
commit be9fd7be9b132fd5a4304f4604848b096af4fdb1
Author: Andrew Dinh <andrewd@openssl.org>
Date: Fri Jul 24 13:37:46 2026 +0700
Fix mutcbk_inject_frames after mutation
mutcbk_inject_frames returned 0 once its one-time mutation was applied, which
tells the QTX the packet send failed and tears down the connection instead of
continuing the test with unmutated packets. Now it passes subsequent packets
through unmodified by returning the input header, iovec, and count unchanged.
Assisted-by: Claude:claude-sonnet-5
Reviewed-by: Saša NedvÄ›dický <sashan@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Wed Jul 29 14:00:23 2026
(Merged from https://github.com/openssl/openssl/pull/32065)
diff --git a/test/radix/quic_tests.c b/test/radix/quic_tests.c
index cdcb673d28..f1abcce118 100644
--- a/test/radix/quic_tests.c
+++ b/test/radix/quic_tests.c
@@ -630,10 +630,17 @@ static int mutcbk_inject_frames(const QUIC_PKT_HDR *hdrin,
/*
* make injection callback a one shot event,
* callback is invoked for every packet we
- * want to modify only one packet here.
+ * want to modify only one packet here. Returning 0 tells the QTX the
+ * packet send itself failed (tearing down the connection), so once
+ * we're done mutating we must pass subsequent packets through
+ * unmodified instead.
*/
- if (mutctx->mutctx_done)
- return 0;
+ if (mutctx->mutctx_done) {
+ *hdrout = (QUIC_PKT_HDR *)hdrin;
+ *iovecout = iovecin;
+ *numout = numin;
+ return 1;
+ }
mutctx->mutctx_done = 1;