Page MenuHomeVyOS Platform

SNMP v3 oid "exclude" option doesn't work
Closed, ResolvedPublicBUG

Description

There is an option to "exclude" for snmp v3 oid, but there is no code/handler/template for it.

set service snmp v3 group ipRoute view 'ipRoute'
set service snmp v3 view ipRoute oid 1.3.6.1.2.1 exclude '1.3.6.1.2.1.4.24'

https://github.com/vyos/vyos-1x/blob/current/src/conf_mode/snmp.py#L364-L380
https://github.com/vyos/vyos-1x/blob/current/data/templates/snmp/etc.snmpd.conf.tmpl#L87-L91

What I get

vyos@r4-roll# cat /etc/snmp/snmpd.conf  | grep vie
# views
view ipRoute included .1.3.6.1.2.1

What I expect

vyos@r4-roll# cat /etc/snmp/snmpd.conf  | grep vie
# views
view ipRoute included .1.3.6.1.2.1
view ipRoute excluded .1.3.6.1.2.1.4.24
vyos@r4-roll#

Also, We need to exclude multiple arguments from one oid. But command line replace it.

set service snmp v3 view ipRoute oid 1.3.6.1.2.1 exclude '1.3.6.1.2.1.4.21'
set service snmp v3 view ipRoute oid 1.3.6.1.2.1 exclude '1.3.6.1.2.1.4.24'
vyos@r4-roll# show service snmp v3 
 group ipRoute {
     view ipRoute
 }
 view ipRoute {
     oid 1.3.6.1.2.1 {
         exclude 1.3.6.1.2.1.4.24
     }
 }
[edit]

Details

Difficulty level
Unknown (require assessment)
Version
VyOS 1.3-rolling-202010190146, vyos-1.4-rolling-202212020318
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

erkin set Issue type to Bug (incorrect behavior).Aug 29 2021, 12:32 PM
erkin removed a subscriber: Active contributors.

Error also present in vyos-1.4-rolling-202212020318

n.fort changed Version from VyOS 1.3-rolling-202010190146 to VyOS 1.3-rolling-202010190146, vyos-1.4-rolling-202212020318.
natali-rs1985 changed the task status from Open to In progress.Mar 6 2024, 5:49 PM