bulkget returns junk when requesting integers and strings

Daniel Ng <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hi,

My server is using net-snmp 5.6. I am getting the same problem with
different snmp clients:


This case is fine:

dng@dng-1:~$ snmpbulkget -v2c -Cn0 -Cr8 -Os -c public 192.168.1.75
enterprises.28458.7.2.4.6.3.1.8 enterprises.28458.7.2.4.6.3.1.7
enterprises.28458.7.2.4.6.3.1.8.1.1 = STRING: "E1 1/1"
enterprises.28458.7.2.4.6.3.1.7.1.1 = INTEGER: 2
enterprises.28458.7.2.4.6.3.1.8.1.2 = STRING: "E1 1/2"
enterprises.28458.7.2.4.6.3.1.7.1.2 = INTEGER: 0
enterprises.28458.7.2.4.6.3.1.8.1.3 = STRING: "E1 1/3"
enterprises.28458.7.2.4.6.3.1.7.1.3 = INTEGER: 0
enterprises.28458.7.2.4.6.3.1.8.1.4 = STRING: "E1 1/4"
enterprises.28458.7.2.4.6.3.1.7.1.4 = INTEGER: 0
enterprises.28458.7.2.4.6.3.1.8.1.5 = STRING: "E1 1/5"
enterprises.28458.7.2.4.6.3.1.7.1.5 = INTEGER: 0
enterprises.28458.7.2.4.6.3.1.8.1.6 = STRING: "E1 1/6"
enterprises.28458.7.2.4.6.3.1.7.1.6 = INTEGER: 0
enterprises.28458.7.2.4.6.3.1.8.1.7 = STRING: "E1 1/7"
enterprises.28458.7.2.4.6.3.1.7.1.7 = INTEGER: 0
enterprises.28458.7.2.4.6.3.1.8.1.8 = STRING: "E1 1/8"
enterprises.28458.7.2.4.6.3.1.7.1.8 = INTEGER: 0


However, if I switch the order of the OIDs on the command line, I get junk:

dng@dng-1:~$ snmpbulkget -v2c -Cn0 -Cr8 -Os -c public 192.168.1.75
enterprises.28458.7.2.4.6.3.1.7 enterprises.28458.7.2.4.6.3.1.8
enterprises.28458.7.2.4.6.3.1.7.1.1 = STRING: "E1 1/1"
enterprises.28458.7.2.4.6.5.1.2.6.1 = INTEGER: 2
enterprises.28458.7.2.4.6.3.1.7.1.2 = INTEGER: 0
enterprises.28458.7.2.4.6.5.1.2.6.2 = INTEGER: 2
enterprises.28458.7.2.4.6.3.1.7.1.3 = INTEGER: 0
enterprises.28458.7.2.4.6.5.1.2.6.3 = INTEGER: 2
enterprises.28458.7.2.4.6.3.1.7.1.4 = INTEGER: 0
enterprises.28458.7.2.4.6.5.1.2.6.4 = INTEGER: 2
enterprises.28458.7.2.4.6.3.1.7.1.5 = INTEGER: 0
enterprises.28458.7.2.4.6.5.1.2.6.5 = INTEGER: 2
enterprises.28458.7.2.4.6.3.1.7.1.6 = INTEGER: 0
enterprises.28458.7.2.4.6.5.1.2.6.6 = INTEGER: 2
enterprises.28458.7.2.4.6.3.1.7.1.7 = INTEGER: 0
enterprises.28458.7.2.4.6.5.1.2.6.7 = INTEGER: 2
enterprises.28458.7.2.4.6.3.1.7.1.8 = INTEGER: 0
enterprises.28458.7.2.4.6.5.1.2.6.8 = INTEGER: 3

-the problem only happens when the first OID is a string and the
second OID is an integer. Note that both of the above OIDs correspond
to elements in the same table.

Can someone please explain why the second case fails, and how it could be fixed?

Cheers,
Daniel

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.