summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorHugo Landau <hlandau@openssl.org>2023-07-26 18:10:16 +0100
committerHugo Landau <hlandau@openssl.org>2023-08-10 18:19:44 +0100
commit17340e87855fb785a986f09208af4279f74a201f (patch)
treed793280a9c79f134c1df38047523ad3cc779e78c /ssl
parent97684a1517ec07300cb87cebe107fa7a709a04ba (diff)
QUIC TEST: Ensure PING causes ACK generation
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21565)
Diffstat (limited to 'ssl')
-rw-r--r--ssl/quic/quic_channel.c5
-rw-r--r--ssl/quic/quic_channel_local.h5
-rw-r--r--ssl/quic/quic_rx_depack.c1
-rw-r--r--ssl/quic/quic_tserver.c5
4 files changed, 15 insertions, 1 deletions
diff --git a/ssl/quic/quic_channel.c b/ssl/quic/quic_channel.c
index af3a1d051a..52ec3d749e 100644
--- a/ssl/quic/quic_channel.c
+++ b/ssl/quic/quic_channel.c
@@ -3332,3 +3332,8 @@ void ossl_quic_channel_set_inhibit_tick(QUIC_CHANNEL *ch, int inhibit)
{
ch->inhibit_tick = (inhibit != 0);
}
+
+uint16_t ossl_quic_channel_get_diag_num_rx_ack(QUIC_CHANNEL *ch)
+{
+ return ch->diag_num_rx_ack;
+}
diff --git a/ssl/quic/quic_channel_local.h b/ssl/quic/quic_channel_local.h
index ba129d9db3..dd86f390be 100644
--- a/ssl/quic/quic_channel_local.h
+++ b/ssl/quic/quic_channel_local.h
@@ -202,7 +202,10 @@ struct quic_channel_st {
*/
uint64_t txku_threshold_override;
- /* Valid if we are in the TERMINATING or TERMINATED states. */
+ /* Diagnostic counters for testing purposes only. May roll over. */
+ uint16_t diag_num_rx_ack; /* Number of ACK frames received */
+
+ /* Valid if we are in the TERMINATING or TERMINATED states. */
QUIC_TERMINATE_CAUSE terminate_cause;
/*
diff --git a/ssl/quic/quic_rx_depack.c b/ssl/quic/quic_rx_depack.c
index a20aac61bf..1b2b81e7f8 100644
--- a/ssl/quic/quic_rx_depack.c
+++ b/ssl/quic/quic_rx_depack.c
@@ -117,6 +117,7 @@ static int depack_do_frame_ack(PACKET *pkt, QUIC_CHANNEL *ch,
packet_space, received))
goto malformed;
+ ++ch->diag_num_rx_ack;
OPENSSL_free(ack_ranges);
return 1;
diff --git a/ssl/quic/quic_tserver.c b/ssl/quic/quic_tserver.c
index 9bd32146c3..15444ecc5b 100644
--- a/ssl/quic/quic_tserver.c
+++ b/ssl/quic/quic_tserver.c
@@ -512,6 +512,11 @@ int ossl_quic_tserver_ping(QUIC_TSERVER *srv)
return 1;
}
+QUIC_CHANNEL *ossl_quic_tserver_get_channel(QUIC_TSERVER *srv)
+{
+ return srv->ch;
+}
+
void ossl_quic_tserver_set_msg_callback(QUIC_TSERVER *srv,
void (*f)(int write_p, int version,
int content_type,