From: Remi Gacogne Date: Mon, 20 Feb 2017 08:08:01 +0000 (+0100) Subject: rec: Fix tab/whitespace mix in `rpzFile()` and `rpzMaster()` X-Git-Tag: rec-4.1.0-alpha1~201^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=563bbdca6168368e390bd5d7412020113b5de0f3;p=thirdparty%2Fpdns.git rec: Fix tab/whitespace mix in `rpzFile()` and `rpzMaster()` --- diff --git a/pdns/rec-lua-conf.cc b/pdns/rec-lua-conf.cc index 1f90d94f3e..1bd32db6aa 100644 --- a/pdns/rec-lua-conf.cc +++ b/pdns/rec-lua-conf.cc @@ -122,47 +122,46 @@ void loadRecursorLuaConfig(const std::string& fname, bool checkOnly) Lua.writeFunction("rpzFile", [&lci](const string& filename, const boost::optional>>& options) { try { - boost::optional defpol; - std::string polName("rpzFile"); - const size_t zoneIdx = lci.dfe.size(); - uint32_t maxTTL = std::numeric_limits::max(); - if(options) { - auto& have = *options; + boost::optional defpol; + std::string polName("rpzFile"); + const size_t zoneIdx = lci.dfe.size(); + uint32_t maxTTL = std::numeric_limits::max(); + if(options) { + auto& have = *options; size_t zoneSizeHint = 0; parseRPZParameters(have, polName, defpol, maxTTL, zoneSizeHint); if (zoneSizeHint > 0) { lci.dfe.reserve(zoneIdx, zoneSizeHint); } - } + } theL()<>>& options) { try { - boost::optional defpol; + boost::optional defpol; TSIGTriplet tt; uint32_t refresh=0; - std::string polName(zone_); - size_t maxReceivedXFRMBytes = 0; - uint32_t maxTTL = std::numeric_limits::max(); - ComboAddress localAddress; - const size_t zoneIdx = lci.dfe.size(); - if(options) { - auto& have = *options; + std::string polName(zone_); + size_t maxReceivedXFRMBytes = 0; + uint32_t maxTTL = std::numeric_limits::max(); + ComboAddress localAddress; + const size_t zoneIdx = lci.dfe.size(); + if(options) { + auto& have = *options; size_t zoneSizeHint = 0; parseRPZParameters(have, polName, defpol, maxTTL, zoneSizeHint); if (zoneSizeHint > 0) { lci.dfe.reserve(zoneIdx, zoneSizeHint); } - if(have.count("tsigname")) { + if(have.count("tsigname")) { tt.name=DNSName(toLower(boost::get(constGet(have, "tsigname")))); tt.algo=DNSName(toLower(boost::get(constGet(have, "tsigalgo")))); if(B64Decode(boost::get(constGet(have, "tsigsecret")), tt.secret)) @@ -177,12 +176,12 @@ void loadRecursorLuaConfig(const std::string& fname, bool checkOnly) if(have.count("localAddress")) { localAddress = ComboAddress(boost::get(constGet(have,"localAddress"))); } - } - ComboAddress master(master_, 53); + } + ComboAddress master(master_, 53); if (localAddress != ComboAddress() && localAddress.sin4.sin_family != master.sin4.sin_family) // We were passed a localAddress, check if its AF matches the master's throw PDNSException("Master address("+master.toString()+") is not of the same Address Family as the local address ("+localAddress.toString()+")."); - DNSName zone(zone_); + DNSName zone(zone_); lci.dfe.setPolicyName(zoneIdx, polName); if (!checkOnly) { @@ -194,10 +193,10 @@ void loadRecursorLuaConfig(const std::string& fname, bool checkOnly) } } catch(std::exception& e) { - theL()<