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

unneeded trailing zero character on SNMP strings #367

Closed
dima1308 opened this issue Sep 21, 2022 · 2 comments
Closed

unneeded trailing zero character on SNMP strings #367

dima1308 opened this issue Sep 21, 2022 · 2 comments

Comments

@dima1308
Copy link

dima1308 commented Sep 21, 2022

Please see attached screenshot
On each SNMP string on responce, there is an extra trailing zero character
Can you please check it?
Screenshot from 2022-09-20 19-10-20

@olofhagsand
Copy link
Member

This seems to be (from SNMPv2-MIB.yang):

     leaf sysDescr {
        type snmpv2-tc:DisplayString {
          length "0..255";
        }
       ...
        smiv2:oid "1.3.6.1.2.1.1.1";
      }

The type resolves to:

  typedef DisplayString {
    type string {
      length "0..255";
    }
    ...
     smiv2:display-hint "255a";

It seems that display-hint 255a is not handled correctly by Clixon (display-hint 255t is handled correctly).
A proposal is to treat 255a in the same way as 255t changing the string to an ASN.1 fixed string.

@olofhagsand
Copy link
Member

Patch submitted. Please verify.

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