]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: fix doh3-less compile 15028/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 10 Jan 2025 10:11:56 +0000 (11:11 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 10 Jan 2025 11:07:47 +0000 (12:07 +0100)
pdns/dnsdistdist/Makefile.am
pdns/dnsdistdist/doh3.hh

index cf53f3335bfefff161b080a6ae8916a821aaf177..91a4e3d35a7297116d3c54877806e0988c87d2d8 100644 (file)
@@ -221,7 +221,7 @@ dnsdist_SOURCES = \
        dnstap.cc dnstap.hh \
        dnswriter.cc dnswriter.hh \
        doh.hh \
-       doh3.hh \
+       doh3.cc doh3.hh \
        dolog.cc dolog.hh \
        doq-common.hh \
        doq.hh \
@@ -321,6 +321,7 @@ testrunner_SOURCES = \
        dnsname.cc dnsname.hh \
        dnsparser.hh dnsparser.cc \
        dnswriter.cc dnswriter.hh \
+       doh3.cc doh3.hh \
        dolog.cc dolog.hh \
        ednscookies.cc ednscookies.hh \
        ednsextendederror.cc ednsextendederror.hh \
@@ -479,11 +480,6 @@ if HAVE_DNS_OVER_QUIC
 dnsdist_SOURCES += doq.cc
 endif
 
-if HAVE_DNS_OVER_HTTP3
-dnsdist_SOURCES += doh3.cc
-testrunner_SOURCES += doh3.cc
-endif
-
 if HAVE_QUICHE
 AM_CPPFLAGS += $(QUICHE_CFLAGS)
 dnsdist_LDADD += $(QUICHE_LDFLAGS) $(QUICHE_LIBS)
index 0288ad14452873f6261bc84263de14dd7be7a014..91d097c09c80d351673bf51a684d85f94986d592 100644 (file)
 
 #include <memory>
 #include <string>
+#include <unordered_map>
 
 #include "config.h"
+
+#ifdef HAVE_DNS_OVER_HTTP3
 #include "channel.hh"
 #include "iputils.hh"
 #include "libssl.hh"
@@ -34,6 +37,7 @@
 
 struct DOH3ServerConfig;
 struct DownstreamState;
+#endif
 
 namespace dnsdist::doh3
 {
@@ -117,18 +121,16 @@ void doh3Thread(ClientState* clientState);
 
 struct DOH3Unit
 {
-  std::string getHTTPPath() const;
-  std::string getHTTPQueryString() const;
-  const std::string& getHTTPHost() const;
-  const std::string& getHTTPScheme() const;
-  const dnsdist::doh3::h3_headers_t& getHTTPHeaders() const;
+  [[nodiscard]] std::string getHTTPPath() const;
+  [[nodiscard]] std::string getHTTPQueryString() const;
+  [[nodiscard]] std::string getHTTPHost() const;
+  [[nodiscard]] std::string getHTTPScheme() const;
+  [[nodiscard]] const dnsdist::doh3::h3_headers_t& getHTTPHeaders() const;
 };
 
 struct DOH3Frontend
 {
-  DOH3Frontend()
-  {
-  }
+  DOH3Frontend() = default;
   void setup()
   {
   }