}
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) {
}
// see if they added followup work for us too
-return true;
+ return true;
}
RecursorLua4::~RecursorLua4() = default;
{
return handle;
}
+
private:
RecursorLua4::PostResolveFFIHandle& handle;
std::unordered_set<std::string> pool;
return (d_prerpz || d_preresolve || d_nxdomain || d_nodata || d_postresolve);
}
-
struct PostResolveFFIHandle
{
PostResolveFFIHandle(DNSQuestion& dnsQuestion) :
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;
};