From b7a406ac34990fdde180ce56491a6261e6c90897 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Mon, 6 Feb 2023 11:54:07 +0100 Subject: [PATCH] MINOR: quic: Update version_information transport parameter to draft-14 This is necessary to make our stack negotiate the QUIC versions with clients. (See https://author-tools.ietf.org/iddiff?url1=draft-ietf-quic-version-negotiation-13&url2=draft-ietf-quic-version-negotiation-14&difftype=--html) Must be backported to 2.7. --- include/haproxy/quic_tp-t.h | 2 +- src/quic_tp.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/haproxy/quic_tp-t.h b/include/haproxy/quic_tp-t.h index 24859e73e..29f993b41 100644 --- a/include/haproxy/quic_tp-t.h +++ b/include/haproxy/quic_tp-t.h @@ -63,7 +63,7 @@ struct tp_version_information { #define QUIC_TP_ACTIVE_CONNECTION_ID_LIMIT 0x0e #define QUIC_TP_INITIAL_SOURCE_CONNECTION_ID 0x0f #define QUIC_TP_RETRY_SOURCE_CONNECTION_ID 0x10 -#define QUIC_TP_DRAFT_VERSION_INFORMATION 0xff73db +#define QUIC_TP_VERSION_INFORMATION 0x11 /* * These defines are not for transport parameter type, but the maximum accepted value for diff --git a/src/quic_tp.c b/src/quic_tp.c index e76375727..ae013613a 100644 --- a/src/quic_tp.c +++ b/src/quic_tp.c @@ -319,7 +319,7 @@ static int quic_transport_param_decode(struct quic_transport_params *p, if (!quic_dec_int(&p->active_connection_id_limit, buf, end)) return 0; break; - case QUIC_TP_DRAFT_VERSION_INFORMATION: + case QUIC_TP_VERSION_INFORMATION: if (!quic_transport_param_dec_version_info(&p->version_information, buf, *buf + len, server)) return 0; @@ -435,7 +435,7 @@ static int quic_transport_param_enc_version_info(unsigned char **buf, tp_len = sizeof chosen_version->num + quic_versions_nb * sizeof(uint32_t); if (!quic_transport_param_encode_type_len(buf, end, - QUIC_TP_DRAFT_VERSION_INFORMATION, + QUIC_TP_VERSION_INFORMATION, tp_len)) return 0;