From e37e0616de85bfc2e8a49ed94950fbda2c09c144 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Wed, 6 Jun 2018 19:17:20 +0200 Subject: T652: snmp.py: listen on all addresses if listen-address is not specified --- src/conf_mode/snmp.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3