From: Y7n05h Date: Fri, 15 Apr 2022 08:46:13 +0000 (+0800) Subject: fix errer key in access convertParamsToConfig X-Git-Tag: auth-4.8.0-alpha0~137^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c31cb3166a22ac4ee4725e2df15fe7be5237e804;p=thirdparty%2Fpdns.git fix errer key in access convertParamsToConfig Signed-off-by: Y7n05h --- diff --git a/pdns/dnsdist-lua-bindings.cc b/pdns/dnsdist-lua-bindings.cc index ee0071140f..74a1d65b93 100644 --- a/pdns/dnsdist-lua-bindings.cc +++ b/pdns/dnsdist-lua-bindings.cc @@ -434,7 +434,7 @@ void setupLuaBindings(LuaContext& luaCtx, bool client) const auto convertParamsToConfig = [&](const std::string name, BPFFilter::MapType type) { BPFFilter::MapConfiguration config; if (const string key = name + "MaxItems"; opts.count(key)) { - const auto& tmp = opts.at(name); + const auto& tmp = opts.at(key); if (tmp.type() != typeid(uint32_t)) { throw std::runtime_error("params is invalid"); } @@ -443,7 +443,7 @@ void setupLuaBindings(LuaContext& luaCtx, bool client) } if (const string key = name + "PinnedPath"; opts.count(key)) { - auto& tmp = opts.at(name); + auto& tmp = opts.at(key); if (tmp.type() != typeid(string)) { throw std::runtime_error("params is invalid"); }