Skip to content

Commit

Permalink
Merge pull request #15183 from rgacogne/ddist19-backport-15118
Browse files Browse the repository at this point in the history
dnsdist-1.9.x: Handle Quiche >= 0.23.0 since the API changed
  • Loading branch information
rgacogne authored Feb 20, 2025
2 parents f059961 + 67c3309 commit a606ca3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
4 changes: 4 additions & 0 deletions pdns/dnsdistdist/doh3.cc
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,11 @@ static void processH3HeaderEvent(ClientState& clientState, DOH3Frontend& fronten
}

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;
Expand Down
15 changes: 11 additions & 4 deletions pdns/dnsdistdist/m4/pdns_with_quiche.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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])
], [ : ])
])
])
])
])
Expand Down

0 comments on commit a606ca3

Please sign in to comment.