From: Remi Gacogne Date: Fri, 6 Mar 2020 16:26:50 +0000 (+0100) Subject: dnsdist: Make sure that the bounded-load factor is >= .0 X-Git-Tag: dnsdist-1.5.0-alpha1~17^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F8909%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Make sure that the bounded-load factor is >= .0 --- 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 {