From 5d49f9ef9a4e45c87d00d40b2ef29649f006f088 Mon Sep 17 00:00:00 2001 From: Hugo Landau Date: Thu, 9 Nov 2023 10:27:14 +0000 Subject: [PATCH] QUIC TXP TEST: Remove dependency on legacy DEMUX-QRX routing Reviewed-by: Tomas Mraz Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/22674) --- test/quic_txp_test.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/test/quic_txp_test.c b/test/quic_txp_test.c index 423d28ddcb..f234fb683a 100644 --- a/test/quic_txp_test.c +++ b/test/quic_txp_test.c @@ -108,6 +108,17 @@ static void helper_cleanup(struct helper *h) BIO_free(h->bio2); } +static void demux_default_handler(QUIC_URXE *e, void *arg, + const QUIC_CONN_ID *dcid) +{ + struct helper *h = arg; + + if (dcid == NULL || !ossl_quic_conn_id_eq(dcid, &dcid_1)) + return; + + ossl_qrx_inject_urxe(h->qrx, e); +} + static int helper_init(struct helper *h) { int rc = 0; @@ -204,6 +215,8 @@ static int helper_init(struct helper *h) fake_now, NULL))) goto err; + ossl_quic_demux_set_default_handler(h->demux, demux_default_handler, h); + h->qrx_args.demux = h->demux; h->qrx_args.short_conn_id_len = 8; h->qrx_args.max_deferred = 32; @@ -211,9 +224,6 @@ static int helper_init(struct helper *h) if (!TEST_ptr(h->qrx = ossl_qrx_new(&h->qrx_args))) goto err; - if (!TEST_true(ossl_qrx_add_dst_conn_id(h->qrx, &dcid_1))) - goto err; - ossl_qrx_allow_1rtt_processing(h->qrx); rc = 1;