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)
This commit is contained in:
Hugo Landau 2023-04-18 19:30:56 +01:00
parent e8b9f63235
commit b6fc2294a1
2 changed files with 17 additions and 2 deletions

View File

@ -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;

View File

@ -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