Hi,

For newer quiche version dnsdist needs some updated version detection.
Remove the explicit QUICHE_CFLAGS and QUICHE_LIBS from the Makefile,
they interfere with quich version detection and don't seem to be
needed anyway.

Note this affects the h3 flavor only.

OK?

        -Otto

Index: Makefile
===================================================================
RCS file: /home/cvs/ports/net/dnsdist/Makefile,v
diff -u -p -r1.52 Makefile
--- Makefile    27 Mar 2025 04:55:38 -0000      1.52
+++ Makefile    28 Mar 2025 15:04:00 -0000
@@ -2,7 +2,7 @@ COMMENT=                highly DNS-, DoS- and abuse-aw
 
 DISTNAME=              dnsdist-1.9.8
 EXTRACT_SUFX=          .tar.bz2
-REVISION=              1
+REVISION=              2
 
 CATEGORIES=            net
 
@@ -75,9 +75,7 @@ CONFIGURE_ARGS+=      --with-libcrypto=${LOCA
 CONFIGURE_ENV+=                
LIBSSL_CFLAGS="-I${LOCALBASE}/eboringssl/include \
                                -DDISABLE_OCSP_STAPLING" \
                        LIBSSL_LIBS="${LOCALBASE}/eboringssl/lib/libssl.a \
-                               ${LOCALBASE}/eboringssl/lib/libcrypto.a" \
-                       QUICHE_CFLAGS=" " \
-                       QUICHE_LIBS='-lquiche'
+                               ${LOCALBASE}/eboringssl/lib/libcrypto.a"
 BUILD_DEPENDS+=                net/quiche \
                        security/boringssl/head
 .else
Index: patches/patch-doh3_cc
===================================================================
RCS file: patches/patch-doh3_cc
diff -N patches/patch-doh3_cc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-doh3_cc       28 Mar 2025 15:04:00 -0000
@@ -0,0 +1,15 @@
+Index: doh3.cc
+--- doh3.cc.orig
++++ doh3.cc
+@@ -751,7 +751,11 @@ static void processH3HeaderEvent(ClientState& clientSt
+   }
+ 
+   if (headers.at(":method") == "POST") {
++#if defined(HAVE_QUICHE_H3_EVENT_HEADERS_HAS_MORE_FRAMES)
++    if (!quiche_h3_event_headers_has_more_frames(event)) {
++#else
+     if (!quiche_h3_event_headers_has_body(event)) {
++#endif
+       handleImmediateError("Empty POST query");
+     }
+     return;
Index: patches/patch-m4_pdns_with_quiche_m4
===================================================================
RCS file: patches/patch-m4_pdns_with_quiche_m4
diff -N patches/patch-m4_pdns_with_quiche_m4
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-m4_pdns_with_quiche_m4        28 Mar 2025 15:04:00 -0000
@@ -0,0 +1,31 @@
+Index: m4/pdns_with_quiche.m4
+--- m4/pdns_with_quiche.m4.orig
++++ m4/pdns_with_quiche.m4
+@@ -10,16 +10,23 @@ AC_DEFUN([PDNS_WITH_QUICHE], [
+ 
+   AS_IF([test "x$with_quiche" != "xno"], [
+     AS_IF([test "x$with_quiche" = "xyes" -o "x$with_quiche" = "xauto"], [
+-      PKG_CHECK_MODULES([QUICHE], [quiche >= 0.22.0], [
++      PKG_CHECK_MODULES([QUICHE], [quiche >= 0.23.0], [
+         [HAVE_QUICHE=1]
+         AC_DEFINE([HAVE_QUICHE], [1], [Define to 1 if you have quiche])
++        AC_DEFINE([HAVE_QUICHE_H3_EVENT_HEADERS_HAS_MORE_FRAMES], [1], 
[Define to 1 if the Quiche API has quiche_h3_event_headers_has_more_frames 
instead of quiche_h3_event_headers_has_body])
+         AC_DEFINE([HAVE_QUICHE_STREAM_ERROR_CODES], [1], [Define to 1 if the 
Quiche API includes error code in quiche_conn_stream_recv and 
quiche_conn_stream_send])
+       ], [
+-        # Quiche is older than 0.22.0, or no Quiche at all
+-        PKG_CHECK_MODULES([QUICHE], [quiche >= 0.15.0], [
++        PKG_CHECK_MODULES([QUICHE], [quiche >= 0.22.0], [
+           [HAVE_QUICHE=1]
+           AC_DEFINE([HAVE_QUICHE], [1], [Define to 1 if you have quiche])
+-        ], [ : ])
++          AC_DEFINE([HAVE_QUICHE_STREAM_ERROR_CODES], [1], [Define to 1 if 
the Quiche API includes error code in quiche_conn_stream_recv and 
quiche_conn_stream_send])
++        ], [
++          # Quiche is older than 0.22.0, or no Quiche at all
++          PKG_CHECK_MODULES([QUICHE], [quiche >= 0.15.0], [
++            [HAVE_QUICHE=1]
++            AC_DEFINE([HAVE_QUICHE], [1], [Define to 1 if you have quiche])
++          ], [ : ])
++        ])
+       ])
+     ])
+   ])

Reply via email to