From 89dbe84fdf7dd6232c2b9faf3789847d2b374f13 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 30 Mar 2026 02:42:16 +0200 Subject: [PATCH] curl_ngtcp2: extend and update callbacks for 1.22.0+ Fixing: ``` lib/vquic/curl_ngtcp2.c:880:1: error: missing field 'recv_stateless_reset2' initializer [-Wmissing-field-initializers] 880 | }; | ^ ``` Also: - GHA/http3-linux: bump to ngtcp2 v1.22.0. Refs: https://github.com/ngtcp2/ngtcp2/releases/tag/v1.22.0 https://github.com/ngtcp2/ngtcp2/commit/b7bfe41db898b59bda031f8ca2d41abf51fa3726 https://github.com/ngtcp2/ngtcp2/pull/2035 Closes #21152 --- .github/workflows/http3-linux.yml | 2 +- lib/vquic/curl_ngtcp2.c | 30 +++++++++++++++++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/.github/workflows/http3-linux.yml b/.github/workflows/http3-linux.yml index b68b761b17..c7eb49ad5d 100644 --- a/.github/workflows/http3-linux.yml +++ b/.github/workflows/http3-linux.yml @@ -54,7 +54,7 @@ env: # renovate: datasource=github-tags depName=ngtcp2/nghttp3 versioning=semver registryUrl=https://github.com NGHTTP3_VERSION: 1.15.0 # renovate: datasource=github-tags depName=ngtcp2/ngtcp2 versioning=semver registryUrl=https://github.com - NGTCP2_VERSION: 1.21.0 + NGTCP2_VERSION: 1.22.0 # renovate: datasource=github-tags depName=nghttp2/nghttp2 versioning=semver registryUrl=https://github.com NGHTTP2_VERSION: 1.68.1 # renovate: datasource=github-tags depName=cloudflare/quiche versioning=semver registryUrl=https://github.com diff --git a/lib/vquic/curl_ngtcp2.c b/lib/vquic/curl_ngtcp2.c index 26bd15d834..725c5163e0 100644 --- a/lib/vquic/curl_ngtcp2.c +++ b/lib/vquic/curl_ngtcp2.c @@ -788,6 +788,7 @@ static void cb_rand(uint8_t *dest, size_t destlen, } } +/* for ngtcp2 data, cidlen); + if(result) + return NGTCP2_ERR_CALLBACK_FAILURE; + cid->datalen = cidlen; + + result = Curl_rand(NULL, token->data, sizeof(token->data)); + if(result) + return NGTCP2_ERR_CALLBACK_FAILURE; + + return 0; +} +#endif + static int cb_recv_rx_key(ngtcp2_conn *tconn, ngtcp2_encryption_level level, void *user_data) { @@ -851,7 +873,7 @@ static ngtcp2_callbacks ng_callbacks = { cb_extend_max_local_streams_bidi, NULL, /* extend_max_local_streams_uni */ cb_rand, - cb_get_new_connection_id, + cb_get_new_connection_id, /* for ngtcp2