Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19734)
ossl_qrx_early_validation_cb *cb,
void *cb_arg);
+/*
+ * Forcibly injects a URXE which has been issued by the DEMUX into the QRX for
+ * processing. This can be used to pass a received datagram to the QRX if it
+ * would not be correctly routed to the QRX via standard DCID-based routing; for
+ * example, when handling an incoming Initial packet which is attempting to
+ * establish a new connection.
+ */
+void ossl_qrx_inject_urxe(OSSL_QRX *qrx, QUIC_URXE *e);
+
/*
* Key Update (RX)
* ===============
OPENSSL_free(qrx);
}
-static void qrx_on_rx(QUIC_URXE *urxe, void *arg)
+void ossl_qrx_inject_urxe(OSSL_QRX *qrx, QUIC_URXE *urxe)
{
- OSSL_QRX *qrx = arg;
-
/* Initialize our own fields inside the URXE and add to the pending list. */
urxe->processed = 0;
urxe->hpr_removed = 0;
ossl_list_urxe_insert_tail(&qrx->urx_pending, urxe);
}
+static void qrx_on_rx(QUIC_URXE *urxe, void *arg)
+{
+ OSSL_QRX *qrx = arg;
+ ossl_qrx_inject_urxe(qrx, urxe);
+}
+
int ossl_qrx_add_dst_conn_id(OSSL_QRX *qrx,
const QUIC_CONN_ID *dst_conn_id)
{