if (ch == NULL)
return;
- if (!ossl_quic_bind_channel(ch, peer, scid, dcid, odcid)) {
- ossl_quic_channel_free(ch);
- return;
+ if (odcid->id_len != 0) {
+ if (!ossl_quic_bind_channel(ch, peer, scid, dcid, odcid)) {
+ ossl_quic_channel_free(ch);
+ return;
+ }
+ } else {
+ /*
+ * No odcid means we didn't do server validation, so we need to
+ * generate a cid via ossl_quic_channel_on_new_conn
+ */
+ if (!ossl_quic_channel_on_new_conn(ch, peer, scid, dcid)) {
+ ossl_quic_channel_free(ch);
+ return;
+ }
}
ossl_list_incoming_ch_insert_tail(&port->incoming_channel_list, ch);
if (hdr.type != QUIC_PKT_TYPE_INITIAL)
goto undesirable;
+ odcid.id_len = 0;
+
/*
* TODO(QUIC SERVER): there should be some logic similar to accounting half-open
* states in TCP. If we reach certain threshold, then we want to