Skip to content

Commit

Permalink
SNMP will now bind on 0.0.0.0 if mgmt ip not specified in minigraph (#…
Browse files Browse the repository at this point in the history
…253)

Fix an issue that snmp will fail to start if mgmt ip is not specified in minigraph (e.g. default graph in oneimage where mgmt ip is from DHCP)
  • Loading branch information
taoyl-ms authored Feb 4, 2017
1 parent 68270f3 commit b2e4483
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions dockers/docker-snmp-sv2/snmpd.conf.j2
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
###############################################################################
# Managed by Ansible
# file: ansible/roles/acs/templates/snmpd.conf.j2
# Managed by sonic-config-engine
###############################################################################
#
# EXAMPLE.conf:
Expand All @@ -14,6 +13,7 @@
# AGENT BEHAVIOUR
#

{% if minigraph_mgmt_interface.addr | ipv4 %}
# Listen for connections on localhost, loopback ip and mgmt (eth0) ip
agentAddress udp:127.0.0.1:161
agentAddress udp:{{ minigraph_mgmt_interface.addr }}:161
Expand All @@ -23,6 +23,11 @@ agentAddress udp:{{ minigraph_mgmt_interface.addr }}:161
agentAddress udp:{{ minigraph_lo_interface.addr }}:161
{% endif %}
{% endfor %}
{% else %}
# Listen on all addresses as mgmt ip not specified in minigraph
agentAddress udp:161
{% endif %}

###############################################################################
#
# ACCESS CONTROL
Expand Down

0 comments on commit b2e4483

Please sign in to comment.