Problem is in "sparse_table_helper_handler" function,
- if (request->requestvb->type == ASN_NULL ||
- request->requestvb->type == SNMP_NOSUCHINSTANCE) {
+ if (request->requestvb->type == SNMP_NOSUCHINSTANCE) {
When ' request->requestvb->type' is ASN_NULL this function is not
assigning ASN_PRIV_RETRY and get next will move to next table instead of
moving to next accessible column/instance.
Please refer to the attached mail thread...
Thanks
-JP
________________________________
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Emi
Yanagi
Sent: Wednesday, September 05, 2007 9:21 PM
To: [email protected]
Subject: When there is "no instance" object in a table,snmpgetnext skip
the rest of the objects in the table and search forthe next table
I am reporting a bug in snmpgetnext. Here is how to reproduce the
problem with nlmLogTable.
NlmLogEntry ::= SEQUENCE {
nlmLogIndex Unsigned32,
nlmLogTime TimeStamp,
nlmLogDateAndTime DateAndTime,
nlmLogEngineID SnmpEngineID,
nlmLogEngineTAddress TAddress,
nlmLogEngineTDomain TDomain,
nlmLogContextEngineID SnmpEngineID,
nlmLogContextName SnmpAdminString,
nlmLogNotificationID OBJECT IDENTIFIER
}
$ snmpget 10.1 nlmLogTime.0.3
NOTIFICATION-LOG-MIB::nlmLogTime."".3 = Timeticks: (15125) 0:02:31.25
$ snmpgetnext 10.1 nlmLogTime.0.3
NOTIFICATION-LOG-MIB::nlmLogDateAndTime."".3 = STRING:
2007-9-5,15:9:29.0,+0:0
$ snmpgetnext 10.1 nlmLogDateAndTime.0.3
NOTIFICATION-LOG-MIB::nlmLogEngineID."".3 = ""
$ snmpget 10.1 nlmLogEngineTAddress.0.3
NOTIFICATION-LOG-MIB::nlmLogEngineTAddress."".3 = No Such Instance
currently exists at this OID
$ snmpget 10.1 nlmLogNotificationID.0.3
NOTIFICATION-LOG-MIB::nlmLogNotificationID."".3 = OID: IF-MIB::linkDown
Now since nlmLogEngineTAddress has no instance, although the last object
nlmLogNotificationID in nlmLogTable exists, snmpgetnext of
nlmLogEngineID will return nlmLogVariableID of the next table
nlmLogVariableTable instead of nlmLogNotificationID in the current table
nlmLogTable.
$ snmpgetnext 10.1 nlmLogEngineID.0.3
NOTIFICATION-LOG-MIB::nlmLogVariableID."".3.1 = OID:
SNMPv2-MIB::sysUpTime.0
Any idea how to improve snmpgetnext in this case?
Emi Yanagi
--- Begin Message ---
Hi All,
I was using net-snmp 5.2.1 and recently updated only agent/helpers
source files to the latest copies.
I am using table-iterator for table implementation.
With the recent update of agent/helpers source files I am facing the
following problem,
If any one get_column*() function returns NULL then getnext will
move to the next table even though there are accessible columns next to
this in the current table.
After spending some time on the cvs diff of these files I got the reason
but not sure.
Problem was in "sparse_table_helper_handler" function,
- if (request->requestvb->type == ASN_NULL ||
- request->requestvb->type == SNMP_NOSUCHINSTANCE) {
+ if (request->requestvb->type == SNMP_NOSUCHINSTANCE) {
When ' request->requestvb->type' is ASN_NULL this function was not
assigning
ASN_PRIV_RETRY and get next was moving to next table instead of moving
to next accessible column/instance.
Let me know if this is the right fix?
Thanks
-JP
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
--- End Message ---
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders