From 82f039d9fa546e631faae9deb1fcb0326bf5a26d Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Fri, 10 Feb 2023 17:32:43 +0100 Subject: [PATCH] dnsdist: Stop using the deprecated 'boost::optional::get_value_or' --- pdns/dnsdist-lua-rules.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdns/dnsdist-lua-rules.cc b/pdns/dnsdist-lua-rules.cc index 33c667676e..12a6e4a849 100644 --- a/pdns/dnsdist-lua-rules.cc +++ b/pdns/dnsdist-lua-rules.cc @@ -387,7 +387,7 @@ void setupLuaRules(LuaContext& luaCtx) }); luaCtx.writeFunction("MaxQPSIPRule", [](unsigned int qps, boost::optional ipv4trunc, boost::optional ipv6trunc, boost::optional burst, boost::optional expiration, boost::optional cleanupDelay, boost::optional scanFraction, boost::optional shards) { - return std::shared_ptr(new MaxQPSIPRule(qps, burst.get_value_or(qps), ipv4trunc.get_value_or(32), ipv6trunc.get_value_or(64), expiration.get_value_or(300), cleanupDelay.get_value_or(60), scanFraction.get_value_or(10), shards.get_value_or(10))); + return std::shared_ptr(new MaxQPSIPRule(qps, (burst ? *burst : qps), (ipv4trunc ? *ipv4trunc : 32), (ipv6trunc ? *ipv6trunc : 64), (expiration ? *expiration : 300), (cleanupDelay ? *cleanupDelay : 60), (scanFraction ? *scanFraction : 10), (shards ? *shards : 10))); }); luaCtx.writeFunction("MaxQPSRule", [](unsigned int qps, boost::optional burst) { -- 2.47.2