Bug 158924 - Agentx Context Name Registration
Agentx Context Name Registration
Product: Fedora
Classification: Fedora
Component: net-snmp (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Radek Vokal
Depends On:
  Show dependency treegraph
Reported: 2005-05-26 17:06 EDT by W Raul S
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version: net-snmp-5.2.2-0.rc3.1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-11-01 08:41:41 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description W Raul S 2005-05-26 17:06:37 EDT
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 http://www.net-snmp.org/tutorial/tutorial-5/toolkit/index.html) 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 08:41:41 EST
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.