Robert,
I applied the patch, re-make, re-generate mib2c for etherStatsTable.
It's still broke, but at different place "Broken pipe". Please see the debug messages below:
$ snmpwalk localhost etherStatsTable
RMON-MIB::etherStatsIndex.1 = INTEGER: 1
RMON-MIB::etherStatsIndex.2 = INTEGER: 2
RMON-MIB::etherStatsDataSource.1 = OID: IF-MIB::ifIndex.1
RMON-MIB::etherStatsDataSource.2 = OID: IF-MIB::ifIndex.1
RMON-MIB::etherStatsDropEvents.1 = Counter32: 0
Error in packet.
Reason: (genError) A general failure occured
Failed object: RMON-MIB::etherStatsDropEvents.1
--------------------------------------------------------------------------------------------------------------------------
results: RMON-MIB::etherStatsDropEvents.1 = Counter32: 0
trace: netsnmp_callback_hook_build(): snmpCallbackDomain.c, 443:
transport_callback: hook_build enter
trace: netsnmp_callback_hook_build(): snmpCallbackDomain.c, 455:
transport_callback: hook_build exit
trace: netsnmp_callback_send(): snmpCallbackDomain.c, 237:
transport_callback: hook_send enter
trace: callback_debug_pdu(): snmpCallbackDomain.c, 91:
dump_send_callback_transport: PDU: command = 162, errstat = 0, errindex = 0
trace: callback_debug_pdu(): snmpCallbackDomain.c, 93:
dump_send_callback_transport: var 2:RMON-MIB::etherStatsDropEvents.1 = Counter32: 0
trace: netsnmp_callback_send(): snmpCallbackDomain.c, 318:
transport_callback: hook_send exit
trace: netsnmp_remove_and_free_agent_snmp_session(): snmp_agent.c, 1657:
snmp_agent: REMOVE session == 0x80b5e20
trace: free_agent_snmp_session(): snmp_agent.c, 1270:
snmp_agent: agent_session 0x80b5e20 released
trace: free_agent_snmp_session(): snmp_agent.c, 1275:
verbose:asp: asp 0x80b5e20 reqinfo 0x80ad678 freed
trace: handle_snmp_packet(): snmp_agent.c, 1798:
snmp_agent: end of handle_snmp_packet, asp = 0x80b5e20
trace: run_alarms(): snmp_alarm.c, 250:
snmp_alarm: run alarm 2
trace: agentx_check_session(): mibgroup/agentx/subagent.c, 929:
agentx/subagent: checking status of session 0x8057c18
trace: agentx_realloc_build_header(): mibgroup/agentx/protocol.c, 611:
dumph_send: AgentX Header
dumpx_send: 01 0D 00 00
dumpv_send: Version: 1
trace: agentx_realloc_build_header(): mibgroup/agentx/protocol.c, 614:
dumpv_send: Command: 13 (Ping)
trace: agentx_realloc_build_header(): mibgroup/agentx/protocol.c, 617:
dumpv_send: Flags: 00
trace: agentx_realloc_build_header(): mibgroup/agentx/protocol.c, 620:
dumph_send: Session ID
dumpx_send: 27 00 00 00
dumpv_send: Integer: 39 (0x27)
trace: agentx_realloc_build_header(): mibgroup/agentx/protocol.c, 629:
dumph_send: Transaction ID
dumpx_send: 00 00 00 00
dumpv_send: Integer: 0 (0x00)
trace: agentx_realloc_build_header(): mibgroup/agentx/protocol.c, 638:
dumph_send: Request ID
dumpx_send: CB 44 A1 10
dumpv_send: Integer: 279004363 (0x10A144CB)
trace: agentx_realloc_build_header(): mibgroup/agentx/protocol.c, 647:
dumph_send: Dummy Length :-(
dumpx_send: 00 00 00 00
dumpv_send: Integer: 0 (0x00)
trace: _agentx_realloc_build(): mibgroup/agentx/protocol.c, 714:
dumph_send: AgentX Payload
dumpx_send:00 00 00 00
dumpv_send: Integer: 0 (0x00)
trace: _agentx_realloc_build(): mibgroup/agentx/protocol.c, 1004:
agentx_build: packet built okay
trace: netsnmp_unix_send(): snmpUnixDomain.c, 160:
netsnmp_unix: send 20 bytes to 0x80bbfe0 on fd 5
Broken pipe
Robert Story <[EMAIL PROTECTED]>
07/25/2005 05:55 PM
|
|
On Fri, 22 Jul 2005 13:21:46 -0500 [EMAIL PROTECTED] wrote:
Not to non-zero, but something greater than 10.
I don't know how I haven't run across this in my testing, but I did track it
down. The length in the get function is supposed to be in bytes, and the
memcpy does take that into account. However, the size check at the top of the
function does not, thus the memcpy is overwriting the buffer. This will only
happen for objects that exceed the default buffer size (40 bytes).
Here is a patch that should fix this. Let me know if you still have problems...
http://sourceforge.net/tracker/index.php?func=detail&aid=1244838&group_id=12694&atid=456380
--
NOTE: messages sent directly to me, instead of the lists, will be deleted
unless they are requests for paid consulting services.
Robert Story; NET-SNMP Junkie
Support: <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp>
Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-coders>
You are lost in a twisty maze of little standards, all different.