From ccff73bb33f34fe68b4aefb05b5049bc364a707b Mon Sep 17 00:00:00 2001 From: Qi Luo Date: Tue, 10 Apr 2018 20:15:20 -0700 Subject: [PATCH] [snmp]: Bind snmpd to all ip addresses (#1587) Signed-off-by: Qi Luo --- dockers/docker-snmp-sv2/snmpd.conf.j2 | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/dockers/docker-snmp-sv2/snmpd.conf.j2 b/dockers/docker-snmp-sv2/snmpd.conf.j2 index b46871dfd6f8..18b7af1e925d 100644 --- a/dockers/docker-snmp-sv2/snmpd.conf.j2 +++ b/dockers/docker-snmp-sv2/snmpd.conf.j2 @@ -13,24 +13,9 @@ # AGENT BEHAVIOUR # -{% if MGMT_INTERFACE %} -# Listen for connections on localhost, loopback ip and mgmt (eth0) ip -agentAddress udp:127.0.0.1:161 -{% for (name, prefix) in MGMT_INTERFACE %} -{% if prefix | ipv4 %} -agentAddress udp:{{ prefix | ip }}:161 -{% endif %} -{% endfor %} -# TODO: only support ipv4 lo addresses, add ipv6 support later -{% for (name, prefix) in LOOPBACK_INTERFACE %} -{% if prefix | ipv4 %} -agentAddress udp:{{ prefix | ip }}:161 -{% endif %} -{% endfor %} -{% else %} -# Listen on all addresses as mgmt ip not specified +# Listen for connections on all ip addresses, including eth0, ipv4 lo agentAddress udp:161 -{% endif %} +# TODO: only support ipv4 lo addresses, add ipv6 support later ############################################################################### #