From e17bf772184ff14a925080a7e8b0ea7d5c8ca327 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Thu, 9 Jun 2022 07:32:06 +0200 Subject: [PATCH] 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. --- src/xprt_quic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xprt_quic.c b/src/xprt_quic.c index 9d59c459e..cf88d4877 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. */