snmpd can lose a registered SMUX sub-tree.
This problem occurred with Net-SNMP 5.0.6 on Linux. I
have located the bug in the source code for Net-SNMP
5.1.
snmpd maintains a sorted list (ActiveRegs) of
registered sub-trees. When an SNMP variable is
requested, the list is followed until the required sub-
tree is found.
If there is just one entry in the list, the next entry is
ALWAYS appended to the list. Therefore, if the first
entry is for 1.2.3 and 1.2.2 is registered next, we end
up with:
1.2.3 -> 1.2.2
A request for 1.2.2.nnn will usually fail because snmpd
will use the registration entry for 1.2.3.
Subsequent registrations are inserted at the correct
position in the list.
In smux_list_add(), the result of the final
snmp_oid_compare() should be used to determine
whether the new registration should be inserted before
or after the head.
Logged In: YES
user_id=848638
Originator: NO
Can you post a specific patch?
Logged In: NO
I don't have a patch to Net-SNMP.
I worked round the problem by registering additional dummy sub-trees.
Logged In: YES
user_id=88893
Originator: NO
Thanks for the bug report!
We've fixed the problem in the 5.3.x and 5.4.x
code branches and the main development tree,
so it should be fixed in future releases of the
Net-SNMP package.