mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 15:47:01 +02:00
BUG/MINOR: quic-be: Wrong retry_source_connection_id check
This commit broke the QUIC backend connection to servers without address validation or retry activated: MINOR: quic-be: address validation support implementation (RETRY) Indeed the retry_source_connection_id transport parameter was already checked as as if it was required, as if the peer (server) was always using the address validation. Furthermore, relying on ->odcid.len to ensure a retry token was received is not correct. This patch ensures the retry_source_connection_id transport parameter is checked only when a retry token was received (->retry_token != NULL). In this case it also checks that this transport parameter is present when a retry token has been received (tx_params->retry_source_connection_id.len != 0). No need to backport.
This commit is contained in:
parent
299a441110
commit
1045623cb8
@ -759,10 +759,14 @@ int quic_transport_params_store(struct quic_conn *qc, int server,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (server && (qc->odcid.len != tx_params->retry_source_connection_id.len ||
|
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)) {
|
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);
|
quic_set_connection_close(qc, quic_err_transport(QC_ERR_TRANSPORT_PARAMETER_ERROR));
|
||||||
return 0;
|
TRACE_ERROR("retry_source_connection_id absence or mismatch", QUIC_EV_TRANSP_PARAMS, qc);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Update the connection from transport parameters received */
|
/* Update the connection from transport parameters received */
|
||||||
|
Loading…
Reference in New Issue
Block a user