]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
ngtcp2: adjust config and code checks for ngtcp2 without nghttp3
authorStefan Eissing <stefan@eissing.org>
Thu, 23 Mar 2023 08:39:37 +0000 (09:39 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 23 Mar 2023 14:39:13 +0000 (15:39 +0100)
- make configure show on HTTP3 feature that both ngtcp2 and nghttp3
  are in play
- define ENABLE_QUIC only when USE_NGTCP2 and USE_NGHTTP3 are defined
- add USE_NGHTTP3 in the ngtcp2 implementation

Fixes #10793
Closes #10821

configure.ac
lib/curl_setup.h
lib/vquic/curl_ngtcp2.c
lib/vquic/curl_ngtcp2.h
lib/vquic/vquic.c

index a889919fed4d9ab9c41dc348a4ae82a0613c7c49..8a8eb0e547c3017bb03687cdb126e0575ab4cc77 100644 (file)
@@ -175,7 +175,7 @@ curl_headers_msg="enabled (--disable-headers-api)"
     ssl_backends=
      curl_h1_msg="enabled (internal)"
      curl_h2_msg="no      (--with-nghttp2, --with-hyper)"
-     curl_h3_msg="no      (--with-ngtcp2, --with-quiche --with-msh3)"
+     curl_h3_msg="no      (--with-ngtcp2 --with-nghttp3, --with-quiche, --with-msh3)"
 
 enable_altsvc="yes"
 hsts="yes"
index 76fccb81d6e448e25592631a864dafdf24b0d0b2..ef30aa1fbec1aad840fea465b1759cd5076bf44d 100644 (file)
@@ -833,7 +833,8 @@ int getpwuid_r(uid_t uid, struct passwd *pwd, char *buf,
 #define USE_HTTP2
 #endif
 
-#if defined(USE_NGTCP2) || defined(USE_QUICHE) || defined(USE_MSH3)
+#if (defined(USE_NGTCP2) && defined(USE_NGHTTP3)) || \
+    defined(USE_QUICHE) || defined(USE_MSH3)
 #define ENABLE_QUIC
 #define USE_HTTP3
 #endif
index d2d0a3a5af3226a8026a40713d2716c873ad8107..18c741c593c027da68441263b99453c8ecf53960 100644 (file)
@@ -24,7 +24,7 @@
 
 #include "curl_setup.h"
 
-#ifdef USE_NGTCP2
+#if defined(USE_NGTCP2) && defined(USE_NGHTTP3)
 #include <ngtcp2/ngtcp2.h>
 #include <nghttp3/nghttp3.h>
 
index 8813ec9a77da7b22637d33f933082edb685bc07e..db3e611bd0c84e273271238702b99e3077d13a17 100644 (file)
@@ -26,7 +26,7 @@
 
 #include "curl_setup.h"
 
-#ifdef USE_NGTCP2
+#if defined(USE_NGTCP2) && defined(USE_NGHTTP3)
 
 #ifdef HAVE_NETINET_UDP_H
 #include <netinet/udp.h>
index bbdeabd6952d70107bf6eaa3aa5ff81aae6cfa4a..87a45255e0aee1b5f08f3c9a25d731c0e1c92d8b 100644 (file)
@@ -53,7 +53,7 @@
 
 void Curl_quic_ver(char *p, size_t len)
 {
-#ifdef USE_NGTCP2
+#if defined(USE_NGTCP2) && defined(USE_NGHTTP3)
   Curl_ngtcp2_ver(p, len);
 #elif defined(USE_QUICHE)
   Curl_quiche_ver(p, len);
@@ -330,7 +330,7 @@ CURLcode Curl_cf_quic_create(struct Curl_cfilter **pcf,
 {
   (void)transport;
   DEBUGASSERT(transport == TRNSPRT_QUIC);
-#ifdef USE_NGTCP2
+#if defined(USE_NGTCP2) && defined(USE_NGHTTP3)
   return Curl_cf_ngtcp2_create(pcf, data, conn, ai);
 #elif defined(USE_QUICHE)
   return Curl_cf_quiche_create(pcf, data, conn, ai);
@@ -349,7 +349,7 @@ bool Curl_conn_is_http3(const struct Curl_easy *data,
                         const struct connectdata *conn,
                         int sockindex)
 {
-#ifdef USE_NGTCP2
+#if defined(USE_NGTCP2) && defined(USE_NGHTTP3)
   return Curl_conn_is_ngtcp2(data, conn, sockindex);
 #elif defined(USE_QUICHE)
   return Curl_conn_is_quiche(data, conn, sockindex);