Hello,
I dig a little bit further.
If you configure/compile snmd with snmp v3
target address/target parameters/notifyFilter,the simple command such as
./snmpget -v2c -c public device-name
snmpNotifyFilterRowStatus.1.65.1.3.6.1.2.1
will kill your snmpd.
The following patch will fix the problem and appreciate some comment
/feedback from the list.
---
net-snmp/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_interface.c
13 Jan 2008 03:01:26 -0000 1.4
+++
net-snmp/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_interface.c
15 Mar 2008 00:54:35 -0000
@@ -973,7 +976,15 @@ _mfd_snmpNotifyFilterTable_get_values(ne
DEBUGMSGTL(("internal:snmpNotifyFilterTable:_mfd_snmpNotifyFilterTable_get_values",
"called\n"));
- netsnmp_assert(NULL != rowreq_ctx);
+ /* when the whole snmpNotifyFilterTable is empty,
+ * it is possible to call get value function with
+ * null rowreq_ctx
+ */
+ if (rowreq_ctx == NULL) {
+ return SNMP_ERR_NOERROR;
+ }
for (; requests; requests = requests->next) {
/*
snmpget output after the fix:
-bash-2.05b$ ./snmpget -Obs -v2c -c public device-name
snmpNotifyFilterRowStatus.1.65.1.3.6.1.2.1
snmpNotifyFilterRowStatus.1.65.1.3.6.1.2.1 = No Such Instance currently
exists at this OID
thanks,
Daniel
Daniel Chuang wrote:
>Hi,
>
> In the snmpd, how do you configure the
>Notify/Target Address/Target Paramenters/NotifyFilterTable Table
>in the snmpd.conf or any other way ?
>
> When you send out GET request to snmpd without any
>entry in the NotifyFilterTable, snmpd cored instead of
>returning NoSuchInstance error. Is this a known problem ?
>
>#0 0x280b71f7 in snmpNotifyFilterRowStatus_get (rowreq_ctx=0x0,
> snmpNotifyFilterRowStatus_val_ptr=0x814da18)
> at
>snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.c:726
>726 (*snmpNotifyFilterRowStatus_val_ptr) =
>(gdb) bt
>#0 0x280b71f7 in snmpNotifyFilterRowStatus_get (rowreq_ctx=0x0,
> snmpNotifyFilterRowStatus_val_ptr=0x814da18)
> at
>snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.c:726
>#1 0x280c8d51 in _mfd_snmpNotifyFilterTable_get_values (handler=0x80e3e20,
> reginfo=0x80b4bc0, agtreq_info=0x813c310, requests=0x81044c0)
> at
>snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_interface.c:947
>#2 0x2814ae70 in _baby_steps_access_multiplexer (handler=0x80e3e20,
> reginfo=0x80b4bc0, reqinfo=0x813c310, requests=0x81044c0) at
>baby_steps.c:460
>#3 0x28125955 in netsnmp_call_next_handler (current=0x80e3e60,
>reginfo=0x80b4bc0,
> reqinfo=0x813c310, requests=0x81044c0) at agent_handler.c:428
>#4 0x2814a8a1 in _baby_steps_helper (handler=0x80e3e60, reginfo=0x80b4bc0,
> reqinfo=0x813c310, requests=0x81044c0) at baby_steps.c:279
>#5 0x28125955 in netsnmp_call_next_handler (current=0x80e3e80,
>reginfo=0x80b4bc0,
> reqinfo=0x813c310, requests=0x81044c0) at agent_handler.c:428
>#6 0x28150dc5 in netsnmp_row_merge_helper_handler (handler=0x80e3e80,
> reginfo=0x80b4bc0, reqinfo=0x813c310, requests=0x81044c0) at
>row_merge.c:198
>#7 0x28125955 in netsnmp_call_next_handler (current=0x80e3ec0,
>reginfo=0x80b4bc0,
> reqinfo=0x813c310, requests=0x81044c0) at agent_handler.c:428
>#8 0x2815b4cd in table_helper_handler (handler=0x80e3ec0,
>reginfo=0x80b4bc0,
> reqinfo=0x813c310, requests=0x81044c0) at table.c:619
>#9 0x28124535 in netsnmp_call_handlers (reginfo=0x80b4bc0,
>reqinfo=0x813c310,
> requests=0x81044c0) at agent_handler.c:428
>#10 0x2811b510 in handle_var_requests (asp=0x813da80) at snmp_agent.c:2474
>#11 0x2811c7b2 in handle_pdu (asp=0x813da80) at snmp_agent.c:3207
>#12 0x2811c474 in netsnmp_handle_request (asp=0x813da80, status=671498752)
> at snmp_agent.c:3047
>#13 0x2811a505 in handle_snmp_packet (op=1, session=0x8055400,
>reqid=1724496933,
> pdu=0x8055300, magic=0x0) at snmp_agent.c:1833
>#14 0x281967af in _sess_process_packet (sessp=0x813c2a0, sp=0x8055400,
> isp=0x8104400, transport=0x81043c0, opaque=0x813c2d0, olength=16,
> packetptr=0x8150000
>"03\002\001\001\004\006public &\002\004fɼ%\002\001",
> length=53) at snmp_api.c:5340
>#15 0x28197924 in _sess_read (sessp=0x813c2a0, fdset=0xbfbff7d0) at
>snmp_api.c:5753
>#16 0x2819796b in snmp_sess_read (sessp=0x813c2a0, fdset=0xbfbff7d0)
> at snmp_api.c:5772
>#17 0x2819690a in snmp_read (fdset=0xbfbff7d0) at snmp_api.c:5392
>#18 0x804b506 in receive () at snmpd.c:1152
>#19 0x804afc4 in main (argc=5, argv=0xbfbff978) at snmpd.c:1001
>#20 0x8049a36 in _start ()
>
>thanks,
>Daniel
>
>-------------------------------------------------------------------------
>This SF.net email is sponsored by: Microsoft
>Defy all challenges. Microsoft(R) Visual Studio 2008.
>http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>_______________________________________________
>Net-snmp-coders mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
>
>
>
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders