return 0;
}
- if (server && (qc->odcid.len != tx_params->retry_source_connection_id.len ||
- memcmp(qc->odcid.data, tx_params->retry_source_connection_id.data, qc->odcid.len) != 0)) {
- TRACE_ERROR("retry_source_connection_id mismatch", QUIC_EV_TRANSP_PARAMS, qc);
- return 0;
+ if (server && qc->retry_token) {
+ if (!tx_params->retry_source_connection_id.len ||
+ (qc->odcid.len != tx_params->retry_source_connection_id.len ||
+ memcmp(qc->odcid.data, tx_params->retry_source_connection_id.data, qc->odcid.len) != 0)) {
+ quic_set_connection_close(qc, quic_err_transport(QC_ERR_TRANSPORT_PARAMETER_ERROR));
+ TRACE_ERROR("retry_source_connection_id absence or mismatch", QUIC_EV_TRANSP_PARAMS, qc);
+ return 1;
+ }
}
/* Update the connection from transport parameters received */