Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to change the "config false" node through snmpset #377

Closed
vvsosed opened this issue Oct 5, 2022 · 1 comment
Closed

Trying to change the "config false" node through snmpset #377

vvsosed opened this issue Oct 5, 2022 · 1 comment

Comments

@vvsosed
Copy link
Contributor

vvsosed commented Oct 5, 2022

Yang node ifAdminStatus (in generated IF-MIB.yang) initially is declared as "read-write":

leaf ifAdminStatus {
    type enumeration {
        .....
    }
    ......
    smiv2:max-access "read-write";
    smiv2:oid "1.3.6.1.2.1.2.2.1.7";
}

Also in my case, the root node IF-MIB (which in turn includes ifAdminStatus) was initially declared as "config true".

In our current implementation, we decided to put all IF-MIB values inside the state database and prohibit any ability to change it outside. Because of that, I decided to rewrite "config true" to "config false" for the IF-MIB container.
After, if we call "snmpset -m ALL -v2c -c private 10.40.0.149 IF-MIB::ifAdminStatus.4 i up" in the result we get empty transaction. Also, I tried to rewrite smiv2:max-access to "read-only" but the result was the same.
I propose that if the node is declared as "config false", the clixon_snmp module must decline "snmpset" operation and must not create an empty transaction.

olofhagsand added a commit that referenced this issue Oct 9, 2022
  * Fixed by returning `SNMP_ERR_NOTWRITABLE` when trying to reserve object
@olofhagsand
Copy link
Member

Fixed by returning SNMP_ERR_NOTWRITABLE when trying to reserve object
Please verify

@vvsosed vvsosed closed this as completed Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants