]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Reformat 13889/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 11 Mar 2024 09:18:59 +0000 (10:18 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 13 Mar 2024 09:23:23 +0000 (10:23 +0100)
pdns/recursordist/lua-recursor4.cc
pdns/recursordist/lua-recursor4.hh

index fce57eb37813e565469cc13a39389b7fe2e831f5..0a682b2e5de820267e78ae1b94ab4fdab47b494e 100644 (file)
@@ -768,7 +768,7 @@ bool RecursorLua4::genhook(const luacall_t& func, DNSQuestion& dnsQuestion, int&
       }
       else if (dnsQuestion.followupFunction == "udpQueryResponse") {
         PacketBuffer packetBuffer = GenUDPQueryResponse(dnsQuestion.udpQueryDest, dnsQuestion.udpQuery);
-        dnsQuestion.udpAnswer = std::string(reinterpret_cast<const char *>(packetBuffer.data()), packetBuffer.size()); //NOLINT(cppcoreguidelines-pro-type-reinterpret-cast)
+        dnsQuestion.udpAnswer = std::string(reinterpret_cast<const char*>(packetBuffer.data()), packetBuffer.size()); // NOLINT(cppcoreguidelines-pro-type-reinterpret-cast)
         // coverity[auto_causes_copy] not copying produces a dangling ref
         const auto cbFunc = d_lw->readVariable<boost::optional<luacall_t>>(dnsQuestion.udpCallback).get_value_or(nullptr);
         if (!cbFunc) {
@@ -790,7 +790,7 @@ bool RecursorLua4::genhook(const luacall_t& func, DNSQuestion& dnsQuestion, int&
   }
 
   // see if they added followup work for us too
-return true;
+  return true;
 }
 
 RecursorLua4::~RecursorLua4() = default;
@@ -1100,6 +1100,7 @@ public:
   {
     return handle;
   }
+
 private:
   RecursorLua4::PostResolveFFIHandle& handle;
   std::unordered_set<std::string> pool;
index b90fe7686693343eab0981889352883b3f93ac59..0c7b9c6828a289e519db9a04974b5d10fb61b921 100644 (file)
@@ -221,7 +221,6 @@ public:
     return (d_prerpz || d_preresolve || d_nxdomain || d_nodata || d_postresolve);
   }
 
-
   struct PostResolveFFIHandle
   {
     PostResolveFFIHandle(DNSQuestion& dnsQuestion) :
@@ -252,25 +251,25 @@ protected:
   void getFeatures(Features& features) override;
 
 private:
-  using gettag_t = std::function<std::tuple<unsigned int, boost::optional<std::unordered_map<int, string>>, boost::optional<LuaContext::LuaObject>, boost::optional<std::string>, boost::optional<std::string>, boost::optional<std::string>, boost::optional<string>> (ComboAddress, Netmask, ComboAddress, DNSName, uint16_t, const EDNSOptionViewMap &, bool, const std::vector<std::pair<int, const ProxyProtocolValue *>> &)>;
+  using gettag_t = std::function<std::tuple<unsigned int, boost::optional<std::unordered_map<int, string>>, boost::optional<LuaContext::LuaObject>, boost::optional<std::string>, boost::optional<std::string>, boost::optional<std::string>, boost::optional<string>>(ComboAddress, Netmask, ComboAddress, DNSName, uint16_t, const EDNSOptionViewMap&, bool, const std::vector<std::pair<int, const ProxyProtocolValue*>>&)>;
   gettag_t d_gettag; // public so you can query if we have this hooked
 
-  using gettag_ffi_t = std::function<boost::optional<LuaContext::LuaObject> (pdns_ffi_param_t *)>;
+  using gettag_ffi_t = std::function<boost::optional<LuaContext::LuaObject>(pdns_ffi_param_t*)>;
   gettag_ffi_t d_gettag_ffi;
 
-  using postresolve_ffi_t = std::function<bool (pdns_postresolve_ffi_handle_t *)>;
+  using postresolve_ffi_t = std::function<bool(pdns_postresolve_ffi_handle_t*)>;
   postresolve_ffi_t d_postresolve_ffi;
 
-  using luamaintenance_t = std::function<void ()>;
+  using luamaintenance_t = std::function<void()>;
   luamaintenance_t d_maintenance;
 
-  using luacall_t = std::function<bool (DNSQuestion *)>;
+  using luacall_t = std::function<bool(DNSQuestion*)>;
   luacall_t d_prerpz, d_preresolve, d_nxdomain, d_nodata, d_postresolve, d_preoutquery, d_postoutquery;
   bool genhook(const luacall_t& func, DNSQuestion& dnsQuestion, int& ret) const;
 
-  using ipfilter_t = std::function<bool (ComboAddress, ComboAddress, struct dnsheader)>;
+  using ipfilter_t = std::function<bool(ComboAddress, ComboAddress, struct dnsheader)>;
   ipfilter_t d_ipfilter;
 
-  using policyEventFilter_t = std::function<bool (PolicyEvent &)>;
+  using policyEventFilter_t = std::function<bool(PolicyEvent&)>;
   policyEventFilter_t d_policyHitEventFilter;
 };