From: <no...@so...> - 2000-12-04 20:20:03
|
Bug #123815, was updated on 2000-Nov-29 08:46 Here is a current snapshot of the bug. Project: net-snmp Category: None Status: Open Resolution: None Bug Group: None Priority: 5 Submitted by: malcolmhowe Assigned to : marz Summary: Perl getnext failing to split instances in 4.2pre2 Details: The following example code breaks under 4.2pre2: use SNMP; $sess = new SNMP::Session(DestHost => 'myhost', Community => 'xxxx'); $var = new SNMP::Varbind(['prEntry',0]); do { $val = $sess->getnext($var); $tag=$var->[$SNMP::Varbind::tag_f]; print "TAG $tag INSTANCE $var->[$SNMP::Varbind::iid_f]", " VALUE $var->[$SNMP::Varbind::val_f]\n"; } until ($sess->{ErrorStr} or $tag !~ /(.*\.)*pr[A-Za-z]+(\.[0-9])*$/); The output under 4.1.2 is as expected TAG prIndex INSTANCE 1 VALUE 1 TAG prNames INSTANCE 1 VALUE inetd TAG prMin INSTANCE 1 VALUE 0 TAG prMax INSTANCE 1 VALUE 0 TAG prCount INSTANCE 1 VALUE 1 TAG prErrorFlag INSTANCE 1 VALUE 0 TAG prErrMessage INSTANCE 1 VALUE TAG prErrFix INSTANCE 1 VALUE 0 TAG prErrFixCmd INSTANCE 1 VALUE TAG memIndex INSTANCE 0 VALUE 0 but under 4.2pre2 I get TAG .iso.org.dod.internet.private.enterprises.ucdavis.prTable.prEntry.prIndex.1 INSTANCE VALUE 1 TAG prNames INSTANCE 1 VALUE inetd TAG .iso.org.dod.internet.private.enterprises.ucdavis.prTable.prEntry.prMin.1 INSTANCE VALUE 0 TAG .iso.org.dod.internet.private.enterprises.ucdavis.prTable.prEntry.prMax.1 INSTANCE VALUE 0 TAG .iso.org.dod.internet.private.enterprises.ucdavis.prTable.prEntry.prCount.1 INSTANCE VALUE 1 TAG .iso.org.dod.internet.private.enterprises.ucdavis.prTable.prEntry.prErrorFlag.1 INSTANCE VALUE 0 TAG prErrMessage INSTANCE 1 VALUE TAG .iso.org.dod.internet.private.enterprises.ucdavis.prTable.prEntry.prErrFix.1 INSTANCE VALUE 0 TAG prErrFixCmd INSTANCE 1 VALUE TAG .iso.org.dod.internet.private.enterprises.ucdavis.memory.memIndex.0 INSTANCE VALUE 0 i.e getnext appears to be failing in some cases only to split the instance from the remainder of the OID. Note prNames, prErrMessage and prErrFixCmd seem to be treated correctly. I believe this worked fine under 4.2pre1 but I don't have a current installation of it to confirm that. Malcolm Follow-Ups: Date: 2000-Dec-03 05:40 By: marz Comment: ahh...now I have to figure how to turn on prEntry in the agent ;) anyone want to give me a hint. ------------------------------------------------------- Date: 2000-Dec-03 07:19 By: nba Comment: Add the following line to snmpd.conf proc inetd ------------------------------------------------------- Date: 2000-Dec-04 12:20 By: hardaker Comment: Apparently this has been fixed already, as I'm not able to reproduce this problem using the latest CVS snapshot (and the exact same code as the example provides). ------------------------------------------------------- For detailed info, follow this link: http://sourceforge.net/bugs/?func=detailbug&bug_id=123815&group_id=12694 |