Skip to content
This repository was archived by the owner on Mar 8, 2022. It is now read-only.
This repository was 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

@0neblock

Description

@0neblock

// 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions