From: Remi Gacogne Date: Tue, 21 Nov 2023 13:59:22 +0000 (+0100) Subject: dnsdist: Fix building with DoQ but without DoH or DoT X-Git-Tag: rec-5.0.0-rc1~25^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=13a81ae641a3e3ee0cec9846f811259774cf515e;p=thirdparty%2Fpdns.git dnsdist: Fix building with DoQ but without DoH or DoT Reported by Oto Šťáva on the mailing-list, thanks! --- diff --git a/pdns/dnsdist-lua.cc b/pdns/dnsdist-lua.cc index 157076025c..396ba3e9d9 100644 --- a/pdns/dnsdist-lua.cc +++ b/pdns/dnsdist-lua.cc @@ -130,7 +130,7 @@ static void parseLocalBindVars(boost::optional& vars, bool& reusePo } } -#if defined(HAVE_DNS_OVER_TLS) || defined(HAVE_DNS_OVER_HTTPS) +#if defined(HAVE_DNS_OVER_TLS) || defined(HAVE_DNS_OVER_HTTPS) || defined(HAVE_DNS_OVER_QUIC) static bool loadTLSCertificateAndKeys(const std::string& context, std::vector& pairs, const boost::variant, LuaArray, LuaArray>>& certFiles, const LuaTypeOrArrayOf& keyFiles) { if (certFiles.type() == typeid(std::string) && keyFiles.type() == typeid(std::string)) { diff --git a/pdns/dnsdistdist/configure.ac b/pdns/dnsdistdist/configure.ac index 8de53ba368..9b3055c496 100644 --- a/pdns/dnsdistdist/configure.ac +++ b/pdns/dnsdistdist/configure.ac @@ -83,9 +83,11 @@ PDNS_ENABLE_DNS_OVER_TLS DNSDIST_ENABLE_DNS_OVER_HTTPS DNSDIST_ENABLE_DNS_OVER_QUIC -AS_IF([test "x$enable_dns_over_tls" != "xno" -o "x$enable_dns_over_https" != "xno"], [ +AS_IF([test "x$enable_dns_over_tls" != "xno" -o "x$enable_dns_over_https" != "xno" -o "x$enable_dns_over_quic" != "xno" ], [ PDNS_WITH_LIBSSL - PDNS_WITH_GNUTLS + AS_IF([test "x$enable_dns_over_tls" != "xno" -o "x$enable_dns_over_https" != "xno"], [ + PDNS_WITH_GNUTLS + ]) ]) AS_IF([test "x$enable_dns_over_tls" != "xno"], [ @@ -111,6 +113,9 @@ AS_IF([test "x$enable_dns_over_quic" != "xno"], [ AS_IF([test "x$HAVE_QUICHE" != "x1"], [ AC_MSG_ERROR([DNS over QUIC support requested but quiche was not found]) ]) + AS_IF([test "x$HAVE_LIBSSL" != "x1"], [ + AC_MSG_ERROR([DNS over QUIC support requested but OpenSSL is not available]) + ]) ]) DNSDIST_WITH_CDB