PowerDNS / pdns

PowerDNS Authoritative, PowerDNS Recursor, dnsdist
https://www.powerdns.com/
GNU General Public License v2.0
3.7k stars 908 forks source link

Running dnsdist in client mode connects to the snmpd AgentX socket #6163

Closed sid3windr closed 6 years ago

sid3windr commented 6 years ago

Short description

Running dnsdist -c prints the message NET-SNMP version 5.7.2.1 AgentX subagent connected. This should likely be reserved for the daemon only, not the client connecting to it.

Environment

Steps to reproduce

  1. Configure SNMP agentx in the dnsdist config: snmpAgent(false)
  2. Restart dnsdist
  3. Connect to the console with -c

Expected behaviour

No SNMP agent activity should occur.

Actual behaviour

host:~# dnsdist -c
NET-SNMP version 5.7.2.1 AgentX subagent connected
>
Habbie commented 6 years ago

Looks like if(client) return; is missing from g_lua.writeFunction("snmpAgent" .., I think.

Habbie commented 6 years ago

Looks like if(client) return; is missing from g_lua.writeFunction("snmpAgent" .., I think.