From 088c18d0eed400d10eac701eb874bab2469c9e61 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Fri, 6 Mar 2020 17:26:50 +0100 Subject: [PATCH] dnsdist: Make sure that the bounded-load factor is >= .0 --- pdns/dnsdist-lua.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pdns/dnsdist-lua.cc b/pdns/dnsdist-lua.cc index c3c22d16c5..3adf375afd 100644 --- a/pdns/dnsdist-lua.cc +++ b/pdns/dnsdist-lua.cc @@ -1642,7 +1642,7 @@ static void setupLuaConfig(bool client, bool configCheck) g_lua.writeFunction("setConsistentHashingBalancingFactor", [](double factor) { setLuaSideEffect(); - if (factor >= 0) { + if (factor >= 1.0) { g_consistentHashBalancingFactor = factor; } else { @@ -1654,7 +1654,7 @@ static void setupLuaConfig(bool client, bool configCheck) g_lua.writeFunction("setWeightedBalancingFactor", [](double factor) { setLuaSideEffect(); - if (factor >= 0) { + if (factor >= 1.0) { g_weightedBalancingFactor = factor; } else { -- 2.39.5