]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist-lua: Really ignore negative numberOfStoredSessions
authorAki Tuomi <cmouse@cmouse.fi>
Mon, 8 Mar 2021 17:53:43 +0000 (19:53 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 26 Jan 2023 15:32:18 +0000 (16:32 +0100)
Broken in b54e94dc8cfe11a36602fc0f4465c1bbb076f7f0

pdns/dnsdist-lua.cc

index ba20ce302a219cb3c44e57cbe53bd7becee43a2a..829e02b0bd7cb415347cfb14d5a7dd2f20b09a24 100644 (file)
@@ -196,8 +196,9 @@ static void parseTLSConfig(TLSConfig& config, const std::string& context, boost:
     if (numberOfStoredSessions < 0) {
       errlog("Invalid value '%d' for %s() parameter 'numberOfStoredSessions', should be >= 0, dismissing", numberOfStoredSessions, context);
       g_outputBuffer = "Invalid value '" +  std::to_string(numberOfStoredSessions) + "' for " + context + "() parameter 'numberOfStoredSessions', should be >= 0, dimissing";
+    } else {
+      config.d_maxStoredSessions = numberOfStoredSessions;
     }
-    config.d_maxStoredSessions = numberOfStoredSessions;
   }
 
   LuaArray<std::string> files;