From: Peter van Dijk Date: Tue, 9 Jan 2018 20:47:04 +0000 (+0100) Subject: do not connect the snmpAgent from a dnsdist client. Fixes #6163 X-Git-Tag: dnsdist-1.3.0~155^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F6164%2Fhead;p=thirdparty%2Fpdns.git do not connect the snmpAgent from a dnsdist client. Fixes #6163 --- diff --git a/pdns/dnsdist-lua.cc b/pdns/dnsdist-lua.cc index 78e67b3064..da7304d9fa 100644 --- a/pdns/dnsdist-lua.cc +++ b/pdns/dnsdist-lua.cc @@ -1282,7 +1282,9 @@ void setupLuaConfig(bool client) g_useTCPSinglePipe = flag; }); - g_lua.writeFunction("snmpAgent", [](bool enableTraps, boost::optional masterSocket) { + g_lua.writeFunction("snmpAgent", [client](bool enableTraps, boost::optional masterSocket) { + if(client) + return; #ifdef HAVE_NET_SNMP if (g_configurationDone) { errlog("snmpAgent() cannot be used at runtime!");