]> git.ipfire.org Git - thirdparty/pdns.git/blobdiff - pdns/rec-dnstap.hh
dnsdist: Add HTTPStatusAction to return a specific HTTP response
[thirdparty/pdns.git] / pdns / rec-dnstap.hh
index 217bcc9cf8650017a4e1a4b042b70058597cf36d..1be6e0a840a6c0da47c4072fa0391fb36cc680bf 100644 (file)
 class RecDnstapMessage : public DnstapMessage
 {
 public:
-  RecDnstapMessage(const std::string& identity, const ComboAddress* requestor, const ComboAddress* responder, bool isTCP, const char* packet, const size_t len, const struct timespec* queryTime, const struct timespec* responseTime)
+  RecDnstapMessage(const std::string& identity, const ComboAddress* requestor, const ComboAddress* responder, bool isTCP, boost::optional<const DNSName&> auth, const char* packet, const size_t len, const struct timespec* queryTime, const struct timespec* responseTime)
       : DnstapMessage(identity, requestor, responder, isTCP, packet, len, queryTime, responseTime) {
     const struct dnsheader* dh = reinterpret_cast<const struct dnsheader*>(packet);
     dnstap::Message* message = proto_message.mutable_message();
     message->set_type(!dh->qr ? dnstap::Message_Type_RESOLVER_QUERY : dnstap::Message_Type_RESOLVER_RESPONSE);
+    if (auth) {
+      message->set_query_zone(auth->toDNSString());
+    }
   }
 };