Re: 5.4 perl - missing indices in bulkwalk result

This is a discussion on Re: 5.4 perl - missing indices in bulkwalk result within the SNMP Users forums, part of the Networking and Network Related category; Hi Dave, I just wanted to give you feedback that tweaking the code in the way you suggested now sets ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2007
Florian Jauernig
 
Posts: n/a
Default Re: 5.4 perl - missing indices in bulkwalk result

Hi Dave,

I just wanted to give you feedback that tweaking the code in the way you
suggested now sets the Error correctly in the SNMP session object.

This way I can work around the the misbehaving agents manually, althought I
would be very happy, if net-snmp could be more fault tolerant, so I do not
need any dirty hacks in my code.

Thanks a lot for your quick help!

Florian

Am Donnerstag, 5. April 2007 17:40 schrieb Dave Shield:
> On 05/04/07, Florian Jauernig <fjauernig@gmx.de> wrote:
> > > Note that the SNMP perl module does include a flag to control the
> > > behaviour when such bogus results are returned:

> >
> > I already tried this - but unfortunately when creating session objects
> > using "new" with the "NonIncreasing" key set to 1, I do not get any
> > errors in the session object.

>
> Hmmm....
>
> I've never actually used this flag (and it's a bit difficult to trigger).
> But comparing the code in SNMP.xs with the equivalent code in
> apps/snmpbulkwalk, I can see a suspicious difference:
>
> SNMP.xs:
> if (__oid_cmp(vars->name, vars->name_length,
> context->reqbase[pix].last_oid,
> context->reqbase[pix].last_len) == 0)
> { if (check) {
> DBPRT(2, (DBOUT "Error: OID not increasing: %s\n",
> // etc
> }
> }
>
> snmpbulkwalk.c:
> if (check && snmp_oid_compare(name, name_length,
> vars->name,
> vars->name_length) >= 0)
> { fprintf(stderr, "Error: OID not increasing: "); // etc
> }
>
>
> The command-line tool picks up on anything other than
> strictly increasing OIDs. The perl module only spots
> a repeasted OID (so wouldn't recognise your situation,
> where the OID actually goes backwards).
>
>
> Try tweaking the SNMP.xs code to use the test "<=" instead of "==",
> (since the two OIDs are presented in the opposite order!)
> recompile, and re-install. Does that make any difference?
>
> Dave


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?p...rge&CID=DEVDEV
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/...net-snmp-users
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:45 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0