Public bug reported:

According to RFC 2790 the hrSWInstalledIndex should start at 1:

  hrSWInstalledIndex OBJECT-TYPE
       SYNTAX     Integer32 (1..2147483647)
       MAX-ACCESS read-only
       STATUS     current
       DESCRIPTION
           "A unique value for each piece of software installed
           on the host.  This value shall be in the range from 1
           to the number of pieces of software installed on the
           host."
       ::= { hrSWInstalledEntry 1 }


However, when grabbing the hrSWInstalledTable, my first entry is at index 0.
Example:
$ snmpbulkget -v2c -c public -Cn1 -Cr1 -ObentU localhost 1.3.6.1.2.1.25.6.3
.1.3.6.1.2.1.25.6.3.1.1.0 = INTEGER: 0

For a CentOS 6 host the behavior is according to spec:
$ snmpbulkget -v2c -c public -Cn1 -Cr1 -ObentU centos6_srv.example.com 
1.3.6.1.2.1.25.6.3
.1.3.6.1.2.1.25.6.3.1.1.1 = INTEGER: 1

I found this issue while trying to read HOST-RESOURCES-MIB::hrSWRunPerfTable 
with pysnmp, but kept getting an exception:
ConstraintsIntersection(ConstraintsIntersection(ConstraintsIntersection(), 
ValueRangeConstraint(-2147483648, 2147483647)), ValueRangeConstraint(1, 
2147483647)) failed at: "ValueRangeConstraint(1, 2147483647) failed at: "0"" at 
Integer32

** Affects: net-snmp (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1314760

Title:
  first hrSWInstalledIndex is 0, should be 1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1314760/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to