dnsQuestion.rcode = ret;
bool handled = func(&dnsQuestion);
- if (handled) {
- loop:;
+ if (!handled) {
+ return false;
+ }
+
+ while (true) {
ret = dnsQuestion.rcode;
if (!dnsQuestion.followupFunction.empty()) {
}
else if (dnsQuestion.followupFunction == "udpQueryResponse") {
PacketBuffer packetBuffer = GenUDPQueryResponse(dnsQuestion.udpQueryDest, dnsQuestion.udpQuery);
- dnsQuestion.udpAnswer = std::string(reinterpret_cast<const char*>(packetBuffer.data()), packetBuffer.size());
+ 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) {
if (!result) {
return false;
}
- goto loop;
+ continue;
}
}
if (dnsQuestion.currentRecords != nullptr) {
*dnsQuestion.currentRecords = dnsQuestion.records;
}
+ break;
}
// see if they added followup work for us too
- return handled;
+return true;
}
RecursorLua4::~RecursorLua4() = default;