From: Peter van Dijk Date: Mon, 25 Mar 2024 10:00:17 +0000 (+0100) Subject: clang-tidy: more descriptive variable name X-Git-Tag: rec-5.1.0-alpha1~88^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ec1794da7a39061c0c4e0581febf756c495aa65;p=thirdparty%2Fpdns.git clang-tidy: more descriptive variable name --- diff --git a/pdns/rfc2136handler.cc b/pdns/rfc2136handler.cc index d72d349dc9..4e30944e0f 100644 --- a/pdns/rfc2136handler.cc +++ b/pdns/rfc2136handler.cc @@ -661,11 +661,11 @@ int PacketHandler::forwardPacket(const string &msgPrefix, const DNSPacket& p, co } -int PacketHandler::processUpdate(DNSPacket& p) { // NOLINT(readability-function-cognitive-complexity) +int PacketHandler::processUpdate(DNSPacket& packet) { // NOLINT(readability-function-cognitive-complexity) if (! ::arg().mustDo("dnsupdate")) return RCode::Refused; - string msgPrefix="UPDATE (" + std::to_string(p.d.id) + ") from " + p.getRemoteString() + " for " + p.qdomain.toLogString() + ": "; + string msgPrefix="UPDATE (" + std::to_string(packet.d.id) + ") from " + packet.getRemoteString() + " for " + packet.qdomain.toLogString() + ": "; g_log< allowedRanges; - B.getDomainMetadata(p.qdomain, "ALLOW-DNSUPDATE-FROM", allowedRanges); + B.getDomainMetadata(packet.qdomain, "ALLOW-DNSUPDATE-FROM", allowedRanges); if (! ::arg()["allow-dnsupdate-from"].empty()) stringtok(allowedRanges, ::arg()["allow-dnsupdate-from"], ", \t" ); @@ -682,7 +682,7 @@ int PacketHandler::processUpdate(DNSPacket& p) { // NOLINT(readability-function- ng.addMask(i); } - if ( ! ng.match(p.getInnerRemote())) { + if ( ! ng.match(packet.getInnerRemote())) { g_log< tsigKeys; - B.getDomainMetadata(p.qdomain, "TSIG-ALLOW-DNSUPDATE", tsigKeys); + B.getDomainMetadata(packet.qdomain, "TSIG-ALLOW-DNSUPDATE", tsigKeys); if (tsigKeys.size() > 0) { bool validKey = false; TSIGRecordContent trc; DNSName inputkey; string message; - if (! p.getTSIGDetails(&trc, &inputkey)) { + if (! packet.getTSIGDetails(&trc, &inputkey)) { g_log< l(s_rfc2136lock); //TODO: i think this lock can be per zone, not for everything g_log<startTransaction(p.qdomain, -1)) { // Not giving the domain_id means that we do not delete the existing records. - g_log<startTransaction(packet.qdomain, -1)) { // Not giving the domain_id means that we do not delete the existing records. + g_log<d_place == DNSResourceRecord::AUTHORITY) { /* see if it's permitted by policy */ if (this->d_update_policy_lua != nullptr) { - if (this->d_update_policy_lua->updatePolicy(rr->d_name, QType(rr->d_type), di.zone, p) == false) { + if (this->d_update_policy_lua->updatePolicy(rr->d_name, QType(rr->d_type), di.zone, packet) == false) { g_log<d_name << "/" << QType(rr->d_type).toString() << ": Not permitted by policy"< notify; - B.getDomainMetadata(p.qdomain, "NOTIFY-DNSUPDATE", notify); + B.getDomainMetadata(packet.qdomain, "NOTIFY-DNSUPDATE", notify); if (!notify.empty() && notify.front() == "1") { Communicator.notifyDomain(di.zone, &B); }