summaryrefslogtreecommitdiff
path: root/src/conf_mode/snmp.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2018-06-06 19:17:20 +0200
committerChristian Poessinger <christian@poessinger.com>2018-06-06 19:17:29 +0200
commite37e0616de85bfc2e8a49ed94950fbda2c09c144 (patch)
treed27700b6e3de13ac2dd6816f369d6180bf14d001 /src/conf_mode/snmp.py
parent734859ae6be526be7ee66d00440933bc3c990a13 (diff)
downloadvyos-1x-e37e0616de85bfc2e8a49ed94950fbda2c09c144.tar.gz
vyos-1x-e37e0616de85bfc2e8a49ed94950fbda2c09c144.zip
T652: snmp.py: listen on all addresses if listen-address is not specified
Diffstat (limited to 'src/conf_mode/snmp.py')
-rwxr-xr-xsrc/conf_mode/snmp.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/conf_mode/snmp.py b/src/conf_mode/snmp.py
index 8238eb42a..152c13dae 100755
--- a/src/conf_mode/snmp.py
+++ b/src/conf_mode/snmp.py
@@ -21,6 +21,7 @@ import os
import stat
import pwd
import time
+
import jinja2
import ipaddress
import random
@@ -119,7 +120,7 @@ SysDescr {{ description }}
{% endif %}
# Listen
-agentaddress unix:/run/snmpd.socket{% for li in listen_on %},{{ li }}{% endfor %}{% if v3_tsm_key %},tlstcp:{{ v3_tsm_port }},dtlsudp::{{ v3_tsm_port }}{% endif %}
+agentaddress unix:/run/snmpd.socket{% if listen_on %}{% for li in listen_on %},{{ li }}{% endfor %}{% else %},udp:161,udp6:161{% endif %}{% if v3_tsm_key %},tlstcp:{{ v3_tsm_port }},dtlsudp::{{ v3_tsm_port }}{% endif %}
# SNMP communities