From: Viktor Szakats Date: Mon, 4 Sep 2023 23:36:06 +0000 (+0000) Subject: http3: adjust cast for ngtcp2 v0.19.0 X-Git-Tag: curl-8_3_0~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c63a4b65441ca5e852c8b2c13e4deb9c2583ce48;p=thirdparty%2Fcurl.git http3: adjust cast for ngtcp2 v0.19.0 ngtcp2 v0.19.0 made size of `ecn` member of `ngtcp2_pkt_info` an `uint8_t` (was: `uint32_t`). Adjust our local cast accordingly. Fixes: ``` ./curl/lib/vquic/curl_ngtcp2.c:1912:12: warning: implicit conversion loses integer precision: 'uint32_t' (aka 'unsigned int') to 'uint8_t' (aka 'unsigned char') [-Wimplicit-int-conversion] pi.ecn = (uint32_t)ecn; ~ ^~~~~~~~~~~~~ ``` Also bump ngtcp2, nghttp3 and nghttp2 to their latest versions in our docs and CI. Ref: https://github.com/ngtcp2/ngtcp2/commit/80447281bbc94af53f8aa7a4cfc19175782894a3 Ref: https://github.com/ngtcp2/ngtcp2/pull/877 Closes #11798 --- diff --git a/.github/workflows/ngtcp2-linux.yml b/.github/workflows/ngtcp2-linux.yml index b5960f1b21..d4b8fc08d9 100644 --- a/.github/workflows/ngtcp2-linux.yml +++ b/.github/workflows/ngtcp2-linux.yml @@ -49,9 +49,9 @@ env: quictls-version: 3.0.10+quic gnutls-version: 3.8.0 wolfssl-version: master - nghttp3-version: v0.14.0 - ngtcp2-version: v0.18.0 - nghttp2-version: v1.55.1 + nghttp3-version: v0.15.0 + ngtcp2-version: v0.19.0 + nghttp2-version: v1.56.0 mod_h2-version: v2.0.21 jobs: diff --git a/.github/workflows/quiche-linux.yml b/.github/workflows/quiche-linux.yml index ed70217190..dd12c4a60b 100644 --- a/.github/workflows/quiche-linux.yml +++ b/.github/workflows/quiche-linux.yml @@ -47,9 +47,9 @@ permissions: {} env: MAKEFLAGS: -j 3 openssl-version: 3.0.10+quic - nghttp3-version: v0.14.0 - ngtcp2-version: v0.18.0 - nghttp2-version: v1.55.1 + nghttp3-version: v0.15.0 + ngtcp2-version: v0.19.0 + nghttp2-version: v1.56.0 quiche-version: 0.17.2 mod_h2-version: v2.0.21 diff --git a/docs/HTTP3.md b/docs/HTTP3.md index 12c8ffac22..1c6d9059ca 100644 --- a/docs/HTTP3.md +++ b/docs/HTTP3.md @@ -39,8 +39,8 @@ Building curl with ngtcp2 involves 3 components: `ngtcp2` itself, `nghttp3` and For now, `ngtcp2` and `nghttp3` are still *experimental* which means their evolution bring breaking changes. Therefore, the proper version of both libraries need to be used when building curl. These are - * `ngtcp2`: v0.18.0 - * `nghttp3`: v0.14.0 + * `ngtcp2`: v0.19.0 + * `nghttp3`: v0.15.0 ## Build with OpenSSL @@ -55,7 +55,7 @@ Build (patched) OpenSSL Build nghttp3 % cd .. - % git clone -b v0.14.0 https://github.com/ngtcp2/nghttp3 + % git clone -b v0.15.0 https://github.com/ngtcp2/nghttp3 % cd nghttp3 % autoreconf -fi % ./configure --prefix= --enable-lib-only @@ -65,7 +65,7 @@ Build nghttp3 Build ngtcp2 % cd .. - % git clone -b v0.18.0 https://github.com/ngtcp2/ngtcp2 + % git clone -b v0.19.0 https://github.com/ngtcp2/ngtcp2 % cd ngtcp2 % autoreconf -fi % ./configure PKG_CONFIG_PATH=/lib/pkgconfig:/lib/pkgconfig LDFLAGS="-Wl,-rpath,/lib" --prefix= --enable-lib-only @@ -98,7 +98,7 @@ Build GnuTLS Build nghttp3 % cd .. - % git clone -b v0.14.0 https://github.com/ngtcp2/nghttp3 + % git clone -b v0.15.0 https://github.com/ngtcp2/nghttp3 % cd nghttp3 % autoreconf -fi % ./configure --prefix= --enable-lib-only @@ -108,7 +108,7 @@ Build nghttp3 Build ngtcp2 % cd .. - % git clone -b v0.18.0 https://github.com/ngtcp2/ngtcp2 + % git clone -b v0.19.0 https://github.com/ngtcp2/ngtcp2 % cd ngtcp2 % autoreconf -fi % ./configure PKG_CONFIG_PATH=/lib/pkgconfig:/lib/pkgconfig LDFLAGS="-Wl,-rpath,/lib" --prefix= --enable-lib-only --with-gnutls @@ -139,7 +139,7 @@ Build wolfSSL Build nghttp3 % cd .. - % git clone -b v0.14.0 https://github.com/ngtcp2/nghttp3 + % git clone -b v0.15.0 https://github.com/ngtcp2/nghttp3 % cd nghttp3 % autoreconf -fi % ./configure --prefix= --enable-lib-only @@ -149,7 +149,7 @@ Build nghttp3 Build ngtcp2 % cd .. - % git clone -b v0.18.0 https://github.com/ngtcp2/ngtcp2 + % git clone -b v0.19.0 https://github.com/ngtcp2/ngtcp2 % cd ngtcp2 % autoreconf -fi % ./configure PKG_CONFIG_PATH=/lib/pkgconfig:/lib/pkgconfig LDFLAGS="-Wl,-rpath,/lib" --prefix= --enable-lib-only --with-wolfssl diff --git a/lib/vquic/curl_ngtcp2.c b/lib/vquic/curl_ngtcp2.c index e75041067a..f5328a4c52 100644 --- a/lib/vquic/curl_ngtcp2.c +++ b/lib/vquic/curl_ngtcp2.c @@ -1919,7 +1919,7 @@ static CURLcode recv_pkt(const unsigned char *pkt, size_t pktlen, ctx->q.local_addrlen); ngtcp2_addr_init(&path.remote, (struct sockaddr *)remote_addr, remote_addrlen); - pi.ecn = (uint32_t)ecn; + pi.ecn = (uint8_t)ecn; rv = ngtcp2_conn_read_pkt(ctx->qconn, &path, &pi, pkt, pktlen, pktx->ts); if(rv) {