if (ch->is_server) {
if (!ossl_quic_wire_encode_transport_param_cid(&wpkt, QUIC_TPARAM_ORIG_DCID,
- &ch->init_dcid))
+ id_to_use))
goto err;
if (!ossl_quic_wire_encode_transport_param_cid(&wpkt, QUIC_TPARAM_INITIAL_SCID,
ch->cur_peer_addr = *peer;
ch->init_dcid = *peer_dcid;
ch->cur_remote_dcid = *peer_scid;
+ ch->odcid.id_len = 0;
+
+ if (peer_odcid != NULL)
+ ch->odcid = *peer_odcid;
/* Inform QTX of peer address. */
if (!ossl_quic_tx_packetiser_set_peer(ch->txp, &ch->cur_peer_addr))
/* Register the peer ODCID in the LCIDM. */
if (!ossl_quic_lcidm_enrol_odcid(ch->lcidm, ch, peer_odcid == NULL ?
- &ch->init_dcid :
- peer_odcid))
+ &ch->init_dcid :
+ peer_odcid))
return 0;
/* Change state. */
*/
QUIC_CONN_ID init_dcid;
+ /*
+ * Server: If this channel is created in response to an init packet sent
+ * after the server has sent a retry packet to do address validation, this
+ * field stores the original connection id from the first init packet sent
+ */
+ QUIC_CONN_ID odcid;
+
/*
* Client: The SCID found in the first Initial packet from the server.
* Not valid for servers.