From: Otto Moerbeek Date: Mon, 11 Mar 2024 09:18:59 +0000 (+0100) Subject: Reformat X-Git-Tag: rec-5.1.0-alpha1~130^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F13889%2Fhead;p=thirdparty%2Fpdns.git Reformat --- diff --git a/pdns/recursordist/lua-recursor4.cc b/pdns/recursordist/lua-recursor4.cc index fce57eb378..0a682b2e5d 100644 --- a/pdns/recursordist/lua-recursor4.cc +++ b/pdns/recursordist/lua-recursor4.cc @@ -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(packetBuffer.data()), packetBuffer.size()); //NOLINT(cppcoreguidelines-pro-type-reinterpret-cast) + dnsQuestion.udpAnswer = std::string(reinterpret_cast(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>(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 pool; diff --git a/pdns/recursordist/lua-recursor4.hh b/pdns/recursordist/lua-recursor4.hh index b90fe76866..0c7b9c6828 100644 --- a/pdns/recursordist/lua-recursor4.hh +++ b/pdns/recursordist/lua-recursor4.hh @@ -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>, boost::optional, boost::optional, boost::optional, boost::optional, boost::optional> (ComboAddress, Netmask, ComboAddress, DNSName, uint16_t, const EDNSOptionViewMap &, bool, const std::vector> &)>; + using gettag_t = std::function>, boost::optional, boost::optional, boost::optional, boost::optional, boost::optional>(ComboAddress, Netmask, ComboAddress, DNSName, uint16_t, const EDNSOptionViewMap&, bool, const std::vector>&)>; gettag_t d_gettag; // public so you can query if we have this hooked - using gettag_ffi_t = std::function (pdns_ffi_param_t *)>; + using gettag_ffi_t = std::function(pdns_ffi_param_t*)>; gettag_ffi_t d_gettag_ffi; - using postresolve_ffi_t = std::function; + using postresolve_ffi_t = std::function; postresolve_ffi_t d_postresolve_ffi; - using luamaintenance_t = std::function; + using luamaintenance_t = std::function; luamaintenance_t d_maintenance; - using luacall_t = std::function; + using luacall_t = std::function; 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; + using ipfilter_t = std::function; ipfilter_t d_ipfilter; - using policyEventFilter_t = std::function; + using policyEventFilter_t = std::function; policyEventFilter_t d_policyHitEventFilter; };