summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorNataliia Solomko <natalirs1985@gmail.com>2024-03-07 15:45:37 +0200
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-03-07 16:19:14 +0000
commit53d3b79af19b47351f4cffad8a38ae2551a623ff (patch)
treecb156d00fa6b62413b75cddfa54c57577be264b3 /data
parentf639e515676b8ac6a176fd04d72134ccc44e1c14 (diff)
downloadvyos-1x-53d3b79af19b47351f4cffad8a38ae2551a623ff.tar.gz
vyos-1x-53d3b79af19b47351f4cffad8a38ae2551a623ff.zip
snmp: T2998: SNMP v3 oid "exclude" option fix
(cherry picked from commit 77a25e95da48549f2791b677f4ba187e547b1c6a)
Diffstat (limited to 'data')
-rw-r--r--data/templates/snmp/etc.snmpd.conf.j27
1 files changed, 6 insertions, 1 deletions
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 %}