diff --git a/examples/client.cc b/examples/client.cc index 43149d0c9cbbe4f1d8e40c7ee340999deedca25d..8613c929856e5ad0129697fbbb8101cde84f7407 100644 --- a/examples/client.cc +++ b/examples/client.cc @@ -532,9 +532,9 @@ int Client::init(int fd, const Address &remote_addr, const char *addr, size_t alpnlen; switch (version) { - case NGTCP2_PROTO_VER_D7: - alpn = reinterpret_cast<const uint8_t *>(NGTCP2_ALPN_D7); - alpnlen = str_size(NGTCP2_ALPN_D7); + case NGTCP2_PROTO_VER_D8: + alpn = reinterpret_cast<const uint8_t *>(NGTCP2_ALPN_D8); + alpnlen = str_size(NGTCP2_ALPN_D8); break; } if (alpn) { @@ -1455,7 +1455,7 @@ void config_set_default(Config &config) { config.nstreams = 1; config.data = nullptr; config.datalen = 0; - config.version = NGTCP2_PROTO_VER_D7; + config.version = NGTCP2_PROTO_VER_D8; config.timeout = 30; } } // namespace diff --git a/examples/server.cc b/examples/server.cc index 25686c32e5053b4e02e41fa09eb41d9c4e8efadc..e14ae3fe6f970d076d2ab6f2e9a047f848d505cb 100644 --- a/examples/server.cc +++ b/examples/server.cc @@ -1661,7 +1661,7 @@ int Server::send_version_negotiation(const ngtcp2_pkt_hd *chd, reserved_ver = generate_reserved_vesrion(sa, salen, hd.version); sv[0] = reserved_ver; - sv[1] = NGTCP2_PROTO_VER_D7; + sv[1] = NGTCP2_PROTO_VER_D8; rv = ngtcp2_upe_new(&upe, buf.wpos(), buf.left()); if (rv != 0) { @@ -1755,9 +1755,9 @@ int alpn_select_proto_cb(SSL *ssl, const unsigned char **out, auto version = ngtcp2_conn_negotiated_version(h->conn()); switch (version) { - case NGTCP2_PROTO_VER_D7: - alpn = reinterpret_cast<const uint8_t *>(NGTCP2_ALPN_D7); - alpnlen = str_size(NGTCP2_ALPN_D7); + case NGTCP2_PROTO_VER_D8: + alpn = reinterpret_cast<const uint8_t *>(NGTCP2_ALPN_D8); + alpnlen = str_size(NGTCP2_ALPN_D8); break; default: if (!config.quiet) { @@ -1780,7 +1780,7 @@ int alpn_select_proto_cb(SSL *ssl, const unsigned char **out, if (!config.quiet) { debug::print_indent(); - std::cerr << "; Client did not present ALPN " << NGTCP2_ALPN_D7 + 1 + std::cerr << "; Client did not present ALPN " << NGTCP2_ALPN_D8 + 1 << std::endl; } @@ -1807,7 +1807,7 @@ int transport_params_add_cb(SSL *ssl, unsigned int ext_type, } params.v.ee.len = 1; - params.v.ee.supported_versions[0] = NGTCP2_PROTO_VER_D7; + params.v.ee.supported_versions[0] = NGTCP2_PROTO_VER_D8; constexpr size_t bufsize = 64; auto buf = std::make_unique<uint8_t[]>(bufsize); diff --git a/lib/includes/ngtcp2/ngtcp2.h b/lib/includes/ngtcp2/ngtcp2.h index 411a543051ea3ea44af985059707883b1078ca8d..7254c2edfc94acfe107663555b324bc6461f4bb2 100644 --- a/lib/includes/ngtcp2/ngtcp2.h +++ b/lib/includes/ngtcp2/ngtcp2.h @@ -155,17 +155,17 @@ typedef struct { ngtcp2_realloc realloc; } ngtcp2_mem; -/* NGTCP2_PROTO_VER_D7 is the supported QUIC protocol version - draft-7. */ -#define NGTCP2_PROTO_VER_D7 0xff000007u +/* NGTCP2_PROTO_VER_D8 is the supported QUIC protocol version + draft-8. */ +#define NGTCP2_PROTO_VER_D8 0xff000008u /* NGTCP2_PROTO_VER_MAX is the highest QUIC version the library supports. */ -#define NGTCP2_PROTO_VER_MAX NGTCP2_PROTO_VER_D7 +#define NGTCP2_PROTO_VER_MAX NGTCP2_PROTO_VER_D8 /* NGTCP2_ALPN_* is a serialized form of ALPN protocol identifier this library supports. Notice that the first byte is the length of the following protocol identifier. */ -#define NGTCP2_ALPN_D7 "\x5hq-07" +#define NGTCP2_ALPN_D8 "\x5hq-08" #define NGTCP2_MAX_PKTLEN_IPV4 1252 #define NGTCP2_MAX_PKTLEN_IPV6 1232 diff --git a/lib/ngtcp2_conn.c b/lib/ngtcp2_conn.c index 448037a194278aa53aa8fe41e6f849b43bbcd421..dbf564c8db9e8f281897c29ba128e25db3e504f3 100644 --- a/lib/ngtcp2_conn.c +++ b/lib/ngtcp2_conn.c @@ -3457,7 +3457,7 @@ int ngtcp2_accept(ngtcp2_pkt_hd *dest, const uint8_t *pkt, size_t pktlen) { } switch (p->version) { - case NGTCP2_PROTO_VER_D7: + case NGTCP2_PROTO_VER_D8: break; default: return 1;