Hi,
The following is the description of my setup -
version: net-snmp-5.2.1
'uname -a' output:
SunOS xyz 5.8 Generic_108529-23 i86pc i386 i86pc
I had the following line in my snmpd.conf file -
monitor -r 10 -o ifDescr "Generate linkUp" ifOperStatus == 1
I have 11 interfaces on the host (some of them logical). I noticed that when
the snmpd
came up, it generated all the traps - 11 of them if the interfaces were all
up. If one of
the interfaces is down, let us say the 6th one, it generates traps only for
the first 5.
It seems like there is memory being used after a free (or I could be missing
something...)
in the file ...
net-snmp/agent/mibgroup/disman/mteTriggerTable.c
in function mte_run_trigger -
'next_oid' which is a member of 'response' is used to create the next
request pdu but
response could be already freed if senttrap=0 (when link is down in this
case) - which
causes erroneous behaviour.
Here is a patch that worked for me -
3289c3289
< char lastbool = 0, boolresult = 0, lastthresh = 0, senttrap
= 0;
---
char lastbool = 0, boolresult = 0, lastthresh = 0;
3310a3311,3314
if(response)
snmp_free_pdu(response);
3417d3420
< senttrap = 1;
3438d3440
< senttrap = 1;
3524d3525
< senttrap = 1;
3577d3577
< senttrap = 1;
3596d3595
< senttrap = 1;
3645,3651d3643
< /*
< * We are now done with the response PDU.
< */
< if (senttrap)
< senttrap = 0;
< else
< snmp_free_pdu(response);
3653a3646,3648
if(response)
snmp_free_pdu(response);
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders