From 53d3b79af19b47351f4cffad8a38ae2551a623ff Mon Sep 17 00:00:00 2001 From: Nataliia Solomko Date: Thu, 7 Mar 2024 15:45:37 +0200 Subject: snmp: T2998: SNMP v3 oid "exclude" option fix (cherry picked from commit 77a25e95da48549f2791b677f4ba187e547b1c6a) --- data/templates/snmp/etc.snmpd.conf.j2 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'data') diff --git a/data/templates/snmp/etc.snmpd.conf.j2 b/data/templates/snmp/etc.snmpd.conf.j2 index b1ceb0451..9d91192fc 100644 --- a/data/templates/snmp/etc.snmpd.conf.j2 +++ b/data/templates/snmp/etc.snmpd.conf.j2 @@ -141,8 +141,13 @@ trap2sink {{ trap }}:{{ trap_config.port }} {{ trap_config.community }} # views {% for view, view_config in v3.view.items() %} {% if view_config.oid is vyos_defined %} -{% for oid in view_config.oid %} +{% for oid, oid_config in view_config.oid.items() %} view {{ view }} included .{{ oid }} +{% if oid_config.exclude is vyos_defined %} +{% for excluded in oid_config.exclude %} +view {{ view }} excluded .{{ excluded }} +{% endfor %} +{% endif %} {% endfor %} {% endif %} {% endfor %} -- cgit v1.2.3