Description of problem:
sysObjectID can be configured in /etc/snmp/snmpd.conf. However, if you set it to an OID with a length greater than 10 (the default value's length), it only reports the first 10 digits. For example, the default value is ".22.214.171.124.4.1.8072.3.2.10". If you change it to ".126.96.36.199.188.8.131.52.184.108.40.206.3", the agent will only report ".220.127.116.11.18.104.22.168.7.6".
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Edit /etc/snmp/snmpd.conf, and add a line to specify the sysObjectID - something like "sysObjectID .22.214.171.124.126.96.36.199.188.8.131.52.3"
2. Restart the agent
3. Query the sysObjectId
The agent will return the specified OID truncated to ".184.108.40.206.220.127.116.11.7.6"
The agent should return the whole OID as specified in the config file.
Here is the link to the net-snmp git repository with the patch that fixes it:
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
Before this release, length of OID parameter of "sysObjectID" snmpd.conf config file option was not correctly stored in snmpd, which resulted in SNMPv2-MIB::sysObjectID being truncated if the OID had more than 10 components. In this update, handling of the length of the OID is fixed and SNMPv2-MIB::sysObjectID is returned correctly.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.