]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
doq: don't add EDNS
authorCharles-Henri Bruyand <charles-henri.bruyand@open-xchange.com>
Tue, 19 Sep 2023 16:38:48 +0000 (18:38 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 9 Oct 2023 11:36:46 +0000 (13:36 +0200)
pdns/dnsdistdist/doq.cc

index b0e05d6a459bb741998aa810409b6f11d96e8ba9..d56059273cbb4df2a5b481651ead16897c89cd54 100644 (file)
@@ -453,22 +453,6 @@ static void processDOQQuery(DOQUnitUniquePtr&& unit)
   ComboAddress remote;
 
   try {
-    {
-      // if there was no EDNS, we add it with a large buffer size
-      // so we can use UDP to talk to the backend.
-      auto dh = const_cast<struct dnsheader*>(reinterpret_cast<const struct dnsheader*>(du->query.data()));
-
-      if (!dh->arcount) {
-        if (generateOptRR(std::string(), du->query, 4096, 4096, 0, false)) {
-          dh = const_cast<struct dnsheader*>(reinterpret_cast<const struct dnsheader*>(du->query.data())); // may have reallocated
-          dh->arcount = htons(1);
-          du->ids.ednsAdded = true;
-        }
-      }
-      else {
-        // we leave existing EDNS in place
-      }
-    }
 
     remote = du->ids.origRemote;
     DOQServerConfig* dsc = du->dsc;