From 2e4e15de32c317ab1f7533699e8bb33aef4bc94d Mon Sep 17 00:00:00 2001 From: Charles-Henri Bruyand Date: Fri, 28 Jun 2024 10:26:49 +0200 Subject: [PATCH] dnsdist: make sure to acquire lua context lock before calling TicketsKeyAdded callback --- pdns/dnsdistdist/dnsdist-lua-hooks.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/pdns/dnsdistdist/dnsdist-lua-hooks.cc b/pdns/dnsdistdist/dnsdist-lua-hooks.cc index 621e734512..a5e984e305 100644 --- a/pdns/dnsdistdist/dnsdist-lua-hooks.cc +++ b/pdns/dnsdistdist/dnsdist-lua-hooks.cc @@ -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) { -- 2.47.2