g_PayloadSizeSelfGenAnswers = payloadSize;
});
+#ifndef DISABLE_SECPOLL
luaCtx.writeFunction("setSecurityPollSuffix", [](const std::string& suffix) {
if (g_configurationDone) {
g_outputBuffer = "setSecurityPollSuffix() cannot be used at runtime!\n";
g_secPollInterval = newInterval;
});
+#endif /* DISABLE_SECPOLL */
luaCtx.writeFunction("setSyslogFacility", [](boost::variant<int, std::string> facility) {
setLuaSideEffect();
DynBlockMaintenance::run();
}
+#ifndef DISABLE_SECPOLL
static void secPollThread()
{
setThreadName("dnsdist/secpoll");
sleep(g_secPollInterval);
}
}
+#endif /* DISABLE_SECPOLL */
static void healthChecksThread()
{
thread dynBlockMaintThread(dynBlockMaintenanceThread);
dynBlockMaintThread.detach();
+#ifndef DISABLE_SECPOLL
if (!g_secPollSuffix.empty()) {
thread secpollthread(secPollThread);
secpollthread.detach();
}
+#endif /* DISABLE_SECPOLL */
if(g_cmdLine.beSupervised) {
#ifdef HAVE_SYSTEMD
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#include "config.h"
+#include "dnsdist-secpoll.hh"
+#ifndef DISABLE_SECPOLL
-#include <string>
#include <vector>
#ifdef HAVE_LIBSODIUM
#include "sstuff.hh"
#include "dnsdist.hh"
-#include "dnsdist-secpoll.hh"
#ifndef PACKAGEVERSION
#define PACKAGEVERSION PACKAGE_VERSION
g_secPollDone = true;
}
}
+
+#endif /* DISABLE_SECPOLL */
*/
#pragma once
+#include "config.h"
+
+#ifndef DISABLE_SECPOLL
+#include <string>
+
extern std::string g_secPollSuffix;
extern time_t g_secPollInterval;
void doSecPoll(const std::string& suffix);
+#endif /* DISABLE_SECPOLL */