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:getBulk SnmpPacket can not get right MaxRepetitions value #413

Merged
merged 1 commit into from Oct 5, 2022
Merged

fix:getBulk SnmpPacket can not get right MaxRepetitions value #413

merged 1 commit into from Oct 5, 2022

Conversation

yonwoo9
Copy link
Contributor

@yonwoo9 yonwoo9 commented Aug 9, 2022

unmarshal getBulk SnmpPacket ,can not get right MaxRepetitions value

when call parseRawField() , the packet Asn1BER type is Integer, then it will call parseInt() to parse MaxRepetitions. the parseInt() only return int type, but in marshal.go assert it as uint32,so you will get 0

Signed-off-by: yonwoo9 <yonwoo9@gmail.com>
@yonwoo9 yonwoo9 changed the title bug:getBulk SnmpPacket can not get right MaxRepetitions value fix:getBulk SnmpPacket can not get right MaxRepetitions value Aug 10, 2022
@SuperQ SuperQ requested a review from TimRots October 5, 2022 08:18
marshal.go Show resolved Hide resolved
@SuperQ SuperQ merged commit 9a70609 into gosnmp:master Oct 5, 2022
kajtzu added a commit to basen/gosnmp that referenced this pull request Oct 13, 2022
bug:getBulk SnmpPacket can not get right MaxRepetitions value (gosnmp#413)
SuperQ added a commit that referenced this pull request Aug 28, 2023
This release now requires Go 1.20 or higher.

* [ENHANCEMENT] Allow sending v1 traps that have no varbinds #426
* [BUGFIX] Fix getBulk SnmpPacket MaxRepetitions value #413
* [BUGFIX] Refactor security logger #422
* [BUGFIX] Add privacy passphrase in extendKeyBlumenthal cacheKey call #425
* [BUGFIX] unmarshal: fix panic from reading beyond slice #441

Signed-off-by: SuperQ <superq@gmail.com>
@SuperQ SuperQ mentioned this pull request Aug 28, 2023
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.

None yet

3 participants