GetNext should always return a value that is >= start oid, but this is not always the case.
E g, if a tree has nodes nnn.2.2 and nnn.2.4 (with values at nnn.2.2.0 and nnn.2.4.0),
but not nnn.2.3, and nnn.2.3 is requested, GetNext will return 2.2.0 instead of the expected 2.4.0.
The proposed code fixes that case by letting Mib.getTextNode return the last descendant.
getTreeNode is only used from Agent/Subagent.getNext, and the relevant code path is executed only if
the node suggested is not in the tree, so changing getTreeNode seems safe enough.
GetNext should always return a value that is >= start oid, but this is not always the case.
E g, if a tree has nodes nnn.2.2 and nnn.2.4 (with values at nnn.2.2.0 and nnn.2.4.0), but not nnn.2.3, and nnn.2.3 is requested, GetNext will return 2.2.0 instead of the expected 2.4.0. The proposed code fixes that case by letting Mib.getTextNode return the last descendant.
getTreeNode is only used from Agent/Subagent.getNext, and the relevant code path is executed only if the node suggested is not in the tree, so changing getTreeNode seems safe enough.