]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Fix the type of numerical DNS over TLS's parameters 7256/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 4 Dec 2018 09:27:28 +0000 (10:27 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 4 Dec 2018 09:27:28 +0000 (10:27 +0100)
We were trying to retrieve two parameters, ticketsKeysRotationDelay
and numberOfTicketsKeys, as strings then convert them to integers,
but the Lua wrapper already exposes them as numerical values.

pdns/dnsdist-lua.cc

index 365b47b21b784c1996e9f3410faa5158436a0ed3..6b46afbc10741f22a47f3a6a7be32435c630f465 100644 (file)
@@ -1625,11 +1625,11 @@ void setupLuaConfig(bool client)
           }
 
           if (vars->count("ticketsKeysRotationDelay")) {
-            frontend->d_ticketsKeyRotationDelay = std::stoi(boost::get<const string>((*vars)["ticketsKeysRotationDelay"]));
+            frontend->d_ticketsKeyRotationDelay = boost::get<int>((*vars)["ticketsKeysRotationDelay"]);
           }
 
           if (vars->count("numberOfTicketsKeys")) {
-            frontend->d_numberOfTicketsKeys = std::stoi(boost::get<const string>((*vars)["numberOfTicketsKeys"]));
+            frontend->d_numberOfTicketsKeys = boost::get<int>((*vars)["numberOfTicketsKeys"]);
           }
 
           if (vars->count("sessionTickets")) {