]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
fix errer key in access convertParamsToConfig
authorY7n05h <Y7n05h@protonmail.com>
Fri, 15 Apr 2022 08:46:13 +0000 (16:46 +0800)
committerY7n05h <Y7n05h@protonmail.com>
Fri, 15 Apr 2022 08:46:13 +0000 (16:46 +0800)
Signed-off-by: Y7n05h <Y7n05h@protonmail.com>
pdns/dnsdist-lua-bindings.cc

index ee0071140f7f4683e0c978c48da1c0e5dfe86ef7..74a1d65b930f62683fa599370d691a00d8aeb5bd 100644 (file)
@@ -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");
           }