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: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cd4bb56b5269fdfc7f180e01b078bcc4cca673af;p=pdns do not connect the snmpAgent from a dnsdist client. Fixes #6163 --- diff --git a/pdns/dnsdist-lua.cc b/pdns/dnsdist-lua.cc index 78e67b306..da7304d9f 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!");