summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Landau <hlandau@openssl.org>2023-04-18 19:30:56 +0100
committerHugo Landau <hlandau@openssl.org>2023-05-12 14:47:13 +0100
commitb6fc2294a1a5bd6053647afea02180147018112b (patch)
tree18f2f7840e5e6514326927d6128633654f10b8f6
parente8b9f63235e82403b7e144ff9a1a3985d44f1c4e (diff)
downloadopenssl-new-b6fc2294a1a5bd6053647afea02180147018112b.tar.gz
QUIC RXDP: Record STOP_SENDING/RESET_STREAM event AEC codes consistently
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20765)
-rw-r--r--include/internal/quic_stream_map.h12
-rw-r--r--ssl/quic/quic_rx_depack.c7
2 files changed, 17 insertions, 2 deletions
diff --git a/include/internal/quic_stream_map.h b/include/internal/quic_stream_map.h
index 51e175ffb8..152a21108d 100644
--- a/include/internal/quic_stream_map.h
+++ b/include/internal/quic_stream_map.h
@@ -60,6 +60,18 @@ struct quic_stream_st {
*/
uint64_t reset_stream_aec;
+ /*
+ * Application Error Code (AEC) for incoming STOP_SENDING frame.
+ * This is only valid if peer_stop_sending is 1.
+ */
+ uint64_t peer_stop_sending_aec;
+
+ /*
+ * Application Error Code (AEC) for incoming RESET_STREAM frame.
+ * This is only valid if peer_reset_stream is 1.
+ */
+ uint64_t peer_reset_stream_aec;
+
/* Temporary value used by TXP. */
uint64_t txp_txfc_new_credit_consumed;
diff --git a/ssl/quic/quic_rx_depack.c b/ssl/quic/quic_rx_depack.c
index 2bc4e146e8..4b9805b01c 100644
--- a/ssl/quic/quic_rx_depack.c
+++ b/ssl/quic/quic_rx_depack.c
@@ -129,7 +129,9 @@ static int depack_do_frame_reset_stream(PACKET *pkt,
return 0;
}
- stream->peer_reset_stream = 1;
+ stream->peer_reset_stream = 1;
+ stream->peer_reset_stream_aec = frame_data.app_error_code;
+
ossl_quic_stream_map_update_state(&ch->qsm, stream);
return 1;
}
@@ -171,7 +173,8 @@ static int depack_do_frame_stop_sending(PACKET *pkt,
return 0;
}
- stream->peer_stop_sending = 1;
+ stream->peer_stop_sending = 1;
+ stream->peer_stop_sending_aec = frame_data.app_error_code;
/*
* RFC 9000 s. 3.5: Receiving a STOP_SENDING frame means we must respond in