From: Frédéric Lécaille Date: Thu, 9 Jun 2022 05:32:06 +0000 (+0200) Subject: MINOR: quic: Released QUIC TLS extension for QUIC v2 draft X-Git-Tag: v2.7-dev1~39 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e17bf772184ff14a925080a7e8b0ea7d5c8ca327;p=thirdparty%2Fhaproxy.git MINOR: quic: Released QUIC TLS extension for QUIC v2 draft This is not clear at all how to distinguish a QUIC draft version number from a released one. And among these QUIC draft versions, which one must use the draft QUIC TLS extension. According to the QUIC implementations which support v2 draft, the TLS extension (transport parameters) to be used is the released one (TLS_EXTENSION_QUIC_TRANSPORT_PARAMETERS). As the unique QUIC draft version we support is 0xff00001d and as at this time the unique version with 0xff as most significant byte is this latter which must use the draft TLS extension, we select the draft TLS extension (TLS_EXTENSION_QUIC_TRANSPORT_PARAMETERS_DRAFT) only for such versions with 0xff as most signification byte. --- diff --git a/src/xprt_quic.c b/src/xprt_quic.c index 9d59c459e1..cf88d48774 100644 --- a/src/xprt_quic.c +++ b/src/xprt_quic.c @@ -4402,7 +4402,7 @@ static struct quic_conn *qc_new_conn(const struct quic_version *qv, int ipv4, } qc->version = qv; - qc->tps_tls_ext = qc->version->num & 0xff000000 ? + qc->tps_tls_ext = (qc->version->num & 0xff000000) == 0xff000000 ? TLS_EXTENSION_QUIC_TRANSPORT_PARAMETERS_DRAFT: TLS_EXTENSION_QUIC_TRANSPORT_PARAMETERS; /* TX part. */