]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Set the protobuf transport protocol to TCP for DoH
authorRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 29 Jun 2021 15:35:31 +0000 (17:35 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 29 Jun 2021 15:35:31 +0000 (17:35 +0200)
We don't support the exact transport yet.

pdns/dnsdist-protobuf.cc

index deac0bdf3e334eff9b7b5776743b0645809a6820..8e91640096fe03b740a97ab26d0c757ff6e9137b 100644 (file)
@@ -124,7 +124,7 @@ void DNSDistProtoBufMessage::serialize(std::string& data) const
     m.setTime(ts.tv_sec, ts.tv_nsec / 1000);
   }
 
-  m.setRequest(d_dq.uniqueId ? *d_dq.uniqueId : getUniqueID(), d_requestor ? *d_requestor : *d_dq.remote, d_responder ? *d_responder : *d_dq.local, d_question ? d_question->d_name : *d_dq.qname, d_question ? d_question->d_type : d_dq.qtype, d_question ? d_question->d_class : d_dq.qclass, d_dq.getHeader()->id, d_dq.overTCP(), d_bytes ? *d_bytes : d_dq.getData().size());
+  m.setRequest(d_dq.uniqueId ? *d_dq.uniqueId : getUniqueID(), d_requestor ? *d_requestor : *d_dq.remote, d_responder ? *d_responder : *d_dq.local, d_question ? d_question->d_name : *d_dq.qname, d_question ? d_question->d_type : d_dq.qtype, d_question ? d_question->d_class : d_dq.qclass, d_dq.getHeader()->id, (d_dq.getProtocol() == DNSQuestion::Protocol::DoH) ? true : d_dq.overTCP(), d_bytes ? *d_bytes : d_dq.getData().size());
 
   if (d_serverIdentity) {
     m.setServerIdentity(*d_serverIdentity);