Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.

Pushing up to 16 VarBinds in packet can cause some devices to drop packet. #73

Open
0neblock opened this issue Jul 2, 2018 · 0 comments

Comments

@0neblock
Copy link

0neblock commented Jul 2, 2018

// Push up to 16 varbinds in the same message.
// The number 16 isn't really that magical, it's just a nice round
// number that usually seems to fit withing a single packet and gets
// accepted by the switches I've tested it on.
for (m = 0; m < 16 && c < options.oids.length; m++) {

I have run into a few networked devices (mostly resource-constrained, such as UPS network cards), which will just drop a packet which has has tried to shove up to 16 Var Binds in it, due to it being too large. By changing this value to 5 or 6, the device will accept it.

Excerpt from the SNMP Protocol Specification RFC1157 Page 16, Chapter 4:

An implementation of this protocol need not accept messages whose length exceeds 484 octets.

I will look into a way to determine the real-time size as the packet gets constructed to see if we can limit the size of the packet to 484 bytes.

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

No branches or pull requests

1 participant