]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: make sure to acquire lua context lock before calling TicketsKeyAdded callback
authorCharles-Henri Bruyand <charles-henri.bruyand@open-xchange.com>
Fri, 28 Jun 2024 08:26:49 +0000 (10:26 +0200)
committerCharles-Henri Bruyand <charles-henri.bruyand@open-xchange.com>
Fri, 28 Jun 2024 08:26:49 +0000 (10:26 +0200)
pdns/dnsdistdist/dnsdist-lua-hooks.cc

index 621e73451205fbcff62b7a14da4d4b6bc2d1e98f..a5e984e3056e1648dcf1b549d24bc39f24dad1a8 100644 (file)
@@ -31,6 +31,7 @@ void setTicketsKeyAddedHook(const LuaContext& context, const TicketsKeyAddedHook
 {
   TLSCtx::setTicketsKeyAddedHook([hook](const std::string& key) {
     try {
+      auto lua = g_lua.lock();
       hook(key.c_str(), key.size());
     }
     catch (const std::exception& exp) {