]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Make sure that the bounded-load factor is >= .0 8909/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 6 Mar 2020 16:26:50 +0000 (17:26 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 6 Mar 2020 16:26:50 +0000 (17:26 +0100)
pdns/dnsdist-lua.cc

index c3c22d16c533f7a4c2755fa05436f1143557ab3d..3adf375afd2455111c5c51c8bcfba58ee6dead09 100644 (file)
@@ -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 {