]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Update pdns/dnsdist-lua.cc
authorY7n05h <Y7n05h@protonmail.com>
Mon, 4 Apr 2022 13:41:09 +0000 (21:41 +0800)
committerGitHub <noreply@github.com>
Mon, 4 Apr 2022 13:41:09 +0000 (21:41 +0800)
Co-authored-by: Remi Gacogne <github@coredump.fr>
pdns/dnsdist-lua.cc

index a08b6d4ae3259c054c8347a10de6db5c820d5939..2f8d858c9bdb89c0538b168c1c2b75fb1fbea226 100644 (file)
@@ -1993,7 +1993,7 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck)
   luaCtx.writeFunction("setTCPFastOpenKey", [](const std::string& keyString) {
     setLuaSideEffect();
     uint32_t key[4] = {};
-    auto ret = sscanf(keyString.c_str(), "%" SCNx32 "%" SCNx32 "%" SCNx32 "%" SCNx32, &key[0], &key[1], &key[2], &key[3]);
+    auto ret = sscanf(keyString.c_str(), "%" SCNx32 "-%" SCNx32 "-%" SCNx32 "-%" SCNx32, &key[0], &key[1], &key[2], &key[3]);
     if (ret != 4) {
       g_outputBuffer = "Invalid value passed to setTCPFastOpenKey()!\n";
       return;