MINOR: quic: Update version_information transport parameter to draft-14
authorFrédéric Lécaille <flecaille@haproxy.com>
Mon, 6 Feb 2023 10:54:07 +0000 (11:54 +0100)
committerFrédéric Lécaille <flecaille@haproxy.com>
Mon, 6 Feb 2023 10:54:07 +0000 (11:54 +0100)
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
src/quic_tp.c

index 24859e7..29f993b 100644 (file)
@@ -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
index e763757..ae01361 100644 (file)
@@ -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;