Re: SNMP Set is getting Failed
Dave Shield <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
On 18 January 2011 08:09, Kumar Sanjay-XJD784 <[email protected]> wrote: > 4. output of snmpd: > MODE_SET_RESERVE1 :Table Details are Empty-> > Fun:ccAuditLoggingCfgTable_handler Line:272 OK - so let's have a look at the code that triggers this message: case MODE_SET_RESERVE1: table_entry = netsnmp_extract_iterator_context(request); table_info = netsnmp_extract_table_info( request); At this point, 'table_info' contains information about which column of the table is to be updated, and 'table_entry' has the row of the table which it should be set in. But remember that you are trying to create a *new* row in the table, so there won't yet be a matching row. (And if there is, then you can't create it again!) So what value do you think that 'table_entry' will have at this point? Back to the code: if(NULL == table_info || NULL == table_entry) return -1; What does this mean? "If we don't have details of which column is being set (i.e. something's gone wrong) or there isn't currently a row in the table (because it hasn't been created yet), then return the (invalid) error -1" Think about that for a moment. Does this feel the correct error handling for this situation? What's wrong with it? So what *should* this error block be checking? Dave PS: the correct error to indicate "something has gone wrong" is SNMP_ERR_GENERR, not -1 snmp_log( LOG_ERR,"\n MODE_SET_RESERVE1 :Table Details are Empty-> Fun:%s Line:%d \n", __func__, __LINE__); return -1; } being set varbind > MODE_SET_FREE :Table Details are Empty-> > Fun:ccAuditLoggingCfgTable_handler Line:354 > > *******snmpd is NOT crashing NOW ****** > > 5. I have attached the dot.c and dot.h file, also snmpd.conf for the > reference. > > Questions: > NOT able to add a new row in the table ? > Could you help me > > Thanks, > sanjay > > > > -----Original Message----- > From: [email protected] [mailto:[email protected]] On > Behalf Of Dave Shield > Sent: Monday, January 17, 2011 6:13 PM > To: Kumar Sanjay-XJD784 > Cc: Net-snmp-users > Subject: Re: SNMP Set is getting Failed > > On 17 January 2011 11:47, Kumar Sanjay-XJD784 > <[email protected]> wrote: >> One of main issue I think set command go doesn't to "RESERVE1" > > Now I'm confused. > You started by saying that the agent *did* call Reserve1, and then Free. > Now you are saying that the agent does *not* call the Reserve1 pass > > Which is it? > > >> I go directly to "FREE" >> >> If possibe can you give the some possible cause of ERROR ?? > > Not without the information that I've asked for. > > You have various 'snmp_log()' statements in your handler. > What do these report when you issue the SET request? > > Let's start from the beginning. > Please do the following: > > * shut down the agent > > * restart the agent using the command > snmpd -f -Le > > * in another window, issue the command > snmpset ..... ccAuditLogRowStatus.\"xyz\".127.0.0.1 i 4 > > (using whatever version/authentication settings are appropriate for your > configuration). > > a) What is the response to the 'snmpset' command? > b) What is the (full) output of the 'snmpd' command? > > > Dave > > ______________________________________________________________________ > This email has been scanned by the MessageLabs Email Security System. > For more information please visit http://www.messagelabs.com/email > ______________________________________________________________________ ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users