diff options
author | Christian Poessinger <christian@poessinger.com> | 2018-06-06 19:17:20 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2018-06-06 19:17:29 +0200 |
commit | e37e0616de85bfc2e8a49ed94950fbda2c09c144 (patch) | |
tree | d27700b6e3de13ac2dd6816f369d6180bf14d001 /src/conf_mode/snmp.py | |
parent | 734859ae6be526be7ee66d00440933bc3c990a13 (diff) | |
download | vyos-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-x | src/conf_mode/snmp.py | 3 |
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 |