summaryrefslogtreecommitdiff
path: root/data/templates/snmp
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2024-03-07 18:08:12 +0100
committerGitHub <noreply@github.com>2024-03-07 18:08:12 +0100
commitfcd2fc01101960c5e8d4fd04995417d35233b16a (patch)
treecb156d00fa6b62413b75cddfa54c57577be264b3 /data/templates/snmp
parentf639e515676b8ac6a176fd04d72134ccc44e1c14 (diff)
parent53d3b79af19b47351f4cffad8a38ae2551a623ff (diff)
downloadvyos-1x-fcd2fc01101960c5e8d4fd04995417d35233b16a.tar.gz
vyos-1x-fcd2fc01101960c5e8d4fd04995417d35233b16a.zip
Merge pull request #3107 from vyos/mergify/bp/sagitta/pr-3105
snmp: T2998: SNMP v3 oid "exclude" option fix (backport #3105)
Diffstat (limited to 'data/templates/snmp')
-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 %}