Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 158924 - Agentx Context Name Registration
Summary: Agentx Context Name Registration
Alias: None
Product: Fedora
Classification: Fedora
Component: net-snmp
Version: 3
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Radek Vokal
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2005-05-26 21:06 UTC by W Raul S
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version: net-snmp-5.2.2-0.rc3.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2005-11-01 13:41:41 UTC

Attachments (Terms of Use)

Description W Raul S 2005-05-26 21:06:37 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513 Fedora/1.0.4-1.3.1 Firefox/1.0.4

Description of problem:
No entries/values are reported for a table (ex. netSnmpHostsTable) when the table is connected through a sub-agent registered with a contextName.  

Using a Net-Snmp example table, netSnmpHostsTable, and the most basic sub-agent wrapping demon (from no results are queriable unless the context is is set to null or "" (no context). 

The current 5.2.1-1.tar.gz source-forge source release also has this problem. The current cvs version does not have this problem. 

Without the context specified, the mib reports the table entries correctly.

To specify the registration handler's contextName:
   netsnmp_handler_registration *my_handler;
   my_handler->contextName = strdup ( "contextName" );   ...

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. snmpd -f -Lo -c /usr/share/snmp/snmpd.conf 
2. ./hostsTable-demon
3. snmptable -v3 -u raul -n "contextName" -l authNoPriv -a MD5 -x DES -A myPassword localhost NET-SNMP-EXAMPLES-MIB::netSnmpHostsTable -Ci -Cl


Actual Results:  NET-SNMP-EXAMPLES-MIB::netSnmpHostsTable: No entries

Expected Results:  SNMP table: NET-SNMP-EXAMPLES-MIB::netSnmpHostsTable

index                   netSnmpHostAddressType netSnmpHostAddress netSnmpHostStorage netSnmpHostRowStatus 
"localhost.localdomain" ipv4                   "7F 00 00 01 "     nonVolatile        active        

Additional info:

With added debugging comments to the library code, the fn int
netsnmp_register_mib(const char *moduleName,
                     struct variable *var,
                     size_t varsize,
                     size_t numvars,
                     oid * mibloc,
                     size_t mibloclen,
                     int priority,
                     int range_subid,
                     oid range_ubound,
                     netsnmp_session * ss,
                     const char *context,
                     int timeout,
                     int flags,
                     netsnmp_handler_registration *reginfo,
                     int perform_callback)

recieves the correct contextName. This occurs within the master agent, but there is no call to register_mib_context() or other context registration etc.

Comment 1 Radek Vokal 2005-11-01 13:41:41 UTC
I've updated rawhide to net-snmp-5.2.2.rc3. This issue should be gone now. 

Note You need to log in before you can comment on or make changes to this bug.