Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug in get-next: test start-oid/end-oid separately #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lakshmankumar12
Copy link

We had a case where

oid: '1.3.6.1.2.1.4.24.4.1'
endoid: '1.3.6.1.2.1.5'

When checking against '1.3.6.1.2.1.4.20.1.1.32.4.1.2', which is below the start-oid's range (note the 20 < 24), it still evaluate as success, making the get-next give a OID that is lesser than the input oid.

The bug seems to be case where the endoid was shorter and this raises a IndexError making the test for (start)oid useless. So, i have separated the tests for soid and eoid. Please consider this change and merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant