On Thu, 4 Aug 2011 13:08:50 +0100 Lewis wrote:
LAV> We are trying to provide a consistent response if a manager attempts to
LAV> send too many sub-requests within a single request. We have finite
LAV> resources and so at some point a malloc will fail and depending where it
LAV> does, the net-snmp engine will either time out or send an error
LAV> response.

Hmm.. If a memory error is causing a time out, that's a bug. Can you provide
more details on that scenario?

LAV> As an 'easy' fix, we were proposing to a add a check so that if the
LAV> number of sub requests exceeds a pre-determined figure, return a
LAV> SNMP_ERR_RESOURCEUNAVAILABLE response. Does this sound sensible, if so,
LAV> where's the best place to implement it? I'm guessing we could modify
LAV> snmp_pdu_parse() to check the count as it runs through the varbind list.

The sensible thing, of course, would be to make sure out of memory is handled
properly. resourceUnavailable should only be returned for a set request, so if
they problem is with get request as well, then tooBig is a better choice for
the error.

------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to