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)
/*
* 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;