]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
1643013 Check of thread-shared field evades lock acquisition
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 3 Dec 2025 08:48:25 +0000 (09:48 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 3 Dec 2025 08:48:25 +0000 (09:48 +0100)
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
pdns/recursordist/rec_channel_rec.cc

index fefcfd1c5f8e1dc2ee63b90b1cb9eddb07fa8f2b..5be4e6d0067275a709ba10582577fb052d54a4ae 100644 (file)
@@ -738,9 +738,10 @@ static Answer doSetDnssecLogBogus(ArgIterator begin, ArgIterator end)
   }
 
   if (pdns_iequals(*begin, "off") || pdns_iequals(*begin, "no")) {
+    auto lock = g_yamlStruct.lock();
     if (g_dnssecLogBogus) {
       g_log << Logger::Warning << "Disabling DNSSEC Bogus logging, requested via control channel" << endl;
-      g_yamlStruct.lock()->dnssec.log_bogus = g_dnssecLogBogus = false;
+      lock->dnssec.log_bogus = g_dnssecLogBogus = false;
       return {0, "DNSSEC Bogus logging disabled\n"};
     }
     return {0, "DNSSEC Bogus logging was already disabled\n"};