fix(snmp): probe with GETBULK, which is what every device answers - #28
Merged
Conversation
snmp-verify has always reported FAIL for neo while snmp-exporter scraped it successfully. The difference was the PDU type: the exporter bulk-walks, this script sent a GET. The MokerLink switch answers GETBULK and silently drops both GET and GETNEXT, so no GET-based probe could ever succeed against it. That is not a cosmetic FAIL. --old infers "rejected" from a timeout, so a probe the device never answers reports every community as refused — including one that still works. Against neo the old-community check was capable only of agreeing with the operator, which is the single thing this script exists not to do. It was skipping neo for an unrelated reason, which is the only thing that kept the wrong answer from being printed. One GETBULK with non-repeaters 0 and max-repetitions 1 is a single round trip returning one varbind — the same cost as the GET it replaces, which matters on a switch that has been bricked by a full walk before. Verified against all four devices. Aimed at the sysDescr node rather than sysDescr.0, since GETBULK is GETNEXT-shaped. The returned OID is asserted, because a GETBULK against a device with no sysDescr returns the next varbind rather than an error, and that would otherwise read as a pass carrying the wrong value. All four now PASS. Refs #9 Co-Authored-By: Claude Opus 5 <[email protected]>
This was referenced Aug 19, 2026
Gerrrt
added a commit
that referenced
this pull request
Aug 19, 2026
fix(snmp): probe with GETBULK, which is what every device answers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes
scripts/snmp-verify.shpass against all four devices, and closes a correctness hole in--old.What changed
probe()sends one GETBULK (-Cn0 -Cr1) instead of one GET.Why
snmp-verifyhas always reportedFAILforneowhilesnmp-exporterscrapedit fine. The difference is the PDU type — the exporter bulk-walks, this script
sent a GET:
The MokerLink switch answers GETBULK and silently drops GET and GETNEXT. No
GET-based probe could ever have succeeded against it.
This is a correctness fix, not a cosmetic one.
--oldinfers "rejected"from a timeout. A probe the device never answers therefore reports every
community as refused — including one that still works. Against
neotheold-community check was capable only of agreeing with the operator. The only
thing preventing that wrong answer from being printed was that
neowas beingSKIPped for an unrelated reason.Design notes
returning a single varbind — the same cost as the GET it replaces. That
matters here: this switch has been bricked by a full walk before.
sysDescr.0, because GETBULK isGETNEXT-shaped — asking for
1.3.6.1.2.1.1.1returns1.3.6.1.2.1.1.1.0.sysDescr does not raise an error, it returns whatever comes next — which
would otherwise be reported as a pass carrying the wrong value. That case is
classified as
nosuchobject, exactly as before.Blast radius
One script. No config, no service, no credential, no segmentation change.
secrets/*.sops.yamlVerification
GETBULK confirmed working against all four devices individually before the
change was made.
shellcheckclean,./scripts/validate.shpasses.make validatepassesFollow-up, not fixed here
--oldprompts for a single previous community and tests it against everydevice. That was right when one string was shared across all four; it is no
longer.
neonow has a different previous community from the other three, soproving it needs its own
--oldrun. Worth a runbook note or a per-deviceprompt, deliberately left out of this change.
Refs #9