Giter Club home page Giter Club logo

Comments (2)

charlestolley avatar charlestolley commented on August 16, 2024

Assuming you are not setting msgMaxSize to something other than the default, this actually seems like a bug in the implementation of the agent. If an agent generates a response that is larger than the limit specified in the request, it's supposed to return a tooBig error. In this case, since it's not doing it, the UDP packet, which may be up to 65535 bytes is getting truncated by the ethernet layer, which supports a maximum payload of 1500 bytes. Clearly netsnmp is more fault-tolerant in this way, and it's able to detect that this is a valid packet that's simply been truncated by the network, and so it downgrades use a getNext request, which you would expect to have a smaller payload.

I'm not sure precisely what it would take to enable this type of fault-tolerance. It would probably involve creating a subclass of ParseError to replace the "Incomplete value" error in the decode() function in ber.py. The SNMPv3Message and PDU classes would need to be updated to continue parsing after detecting this error, in order to read the message/request ID, if possible, so that the proper RequestHandle can be notified of the failure, and propagate the error to the caller of getBulk().

In the meantime, you will probably need to manually limit the number of values you request at once, so that the agent will not generate responses that are too large.

from python-snmp.

denisbondar avatar denisbondar commented on August 16, 2024

In general, ZTE vendor's equipment is quite unstable. It is hard to argue with this.

To check, I reduced max-repetitions to 2 (it was 10) and got a correct response (from wireshark's point of view).

image

But anyway I see that net-snmp makes an additional snmp-get request to explicitly get noSuchObject. And this idea seems quite good to me.

Maybe that practice should be adopted for python-snmp as well? Including within the getNext and getBulk methods, so that instead of repeating snmp-get-next or snmp-get-bulk requests within a timeout, perform a snmp-get request to determine if the requested OID exists?

from python-snmp.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.