After further investigation, have determined TrapReciever.xs is calling
Perl_newSVpv using the community name and community name length.

If the community name is empty, this is what seems to cause Perl_newSVpv
to crash.

Have worked around this by changing the line in TrapReciever.xs

That reads:


         STOREPDU("community", newSVpv(pdu->community,
pdu->community_len));



To instead read:


            if (pdu->community_len == 0) {
                STOREPDU("community", 
                        newSV(0));
            } else {
                STOREPDU("community",
                        newSVpv(pdu->community, pdu->community_len));
            }

Then rebuilt and re-installed net-snmp.

Don't know if there is a better place to fix this but the above worked
for me.


-----Original Message-----
From: Neil Davidson 
Sent: Thursday, December 29, 2005 5:00 PM
To: 'Wes Hardaker'
Cc: '[email protected]'
Subject: RE: snmptrapd crash on Fedora Core 4

Wes,

(My first attempt to respond, seemed to get bounced by your mail server
am trying again).

The following trap, triggered by removing and re-inserting a module in
our own media converter chassis, as seen in /var/log/messages, seems to
trigger the crash:


Dec 29 16:30:12 fedora1 snmptrapd[21910]: 2005-12-29 16:30:12 icc19
[172.16.4.75] (via UDP: [172.16.4.75]:2429) TRAP, SNMP v1, community
OMNITRON-MIB::omnitron Enterprise Specific Trap
(OMNITRON-MIB::icModcoldstrt) Uptime: 28 days, 13:28:08.26
OMNITRON-MIB::trapchassis.0 = INTEGER: 1        OMNITRON-MIB::trapslot.0
= INTEGER: 7   OMNITRON-MIB::trapcode.0 = INTEGER: 0
OMNITRON-MIB::trapip.0 = IpAddress: 172.16.4.75
OMNITRON-MIB::trapmoduledescription.0 = ""

-----Original Message-----
From: Wes Hardaker [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 29, 2005 4:26 PM
To: Neil Davidson
Cc: [email protected]
Subject: Re: snmptrapd crash on Fedora Core 4

>>>>> On Thu, 29 Dec 2005 11:53:33 -0800, "Neil Davidson"
<[EMAIL PROTECTED]> said:

So are you sending it a trap?  If so, how?  What triggers the crash
exactly?

-- 
Wes Hardaker
Sparta, Inc.


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
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

Reply via email to