Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNMP will now bind on 0.0.0.0 if mgmt ip not specified in minigraph #253

Merged
merged 1 commit into from
Feb 4, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 %}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is should only affect line 19, not other addresses.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't bind on any other addresses with port 161 anymore after you bind on 0.0.0.0:161


In reply to: 99453733 [](ancestors = 99453733)

# 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