<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to patches</title><link>https://sourceforge.net/p/snmptt/patches/</link><description>Recent changes to patches</description><atom:link href="https://sourceforge.net/p/snmptt/patches/feed.rss" rel="self"/><language>en</language><lastBuildDate>Fri, 27 Apr 2012 12:47:51 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/snmptt/patches/feed.rss" rel="self" type="application/rss+xml"/><item><title>Making snmptt working if snmptrapd is started with Option -n</title><link>https://sourceforge.net/p/snmptt/patches/8/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Little patch which has to be inserted around line 3180:&lt;br /&gt;
# if net-snmp is configured not to translate source addresses of incoming packets into hostname (Option -n) then the&lt;br /&gt;
# tempvariable contains something like UDP: [192.168.1.23]:56977-&amp;gt;[192.168.0.20]:162&lt;br /&gt;
# so extract here the ip - for some reason it does also work if we are working with hostnames ...&lt;br /&gt;
else{&lt;br /&gt;
$tempvar[0] =~ /(\d+\.\d+\.\d+\.\d+)/;&lt;br /&gt;
$tempvar[0] = $1;&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;The problem was, that if snmptrapd ist started with -n (disable name resolution) in the db there are entries like  [192.168.1.23]:56977-&amp;gt;[192.168.0.20]:162 which doesn't make any sense. &lt;br /&gt;
This patch corrects this - however I am really not a perl specialist....&lt;/p&gt;
&lt;p&gt;Best regards...&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">schoby</dc:creator><pubDate>Fri, 27 Apr 2012 12:47:51 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net3e65335f98c20cc47b698a500021da43df04a1b2</guid></item><item><title>Fix snmptt debug log permissions in daemon mode</title><link>https://sourceforge.net/p/snmptt/patches/7/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;snmptt in daemon mode creates debug log file (/var/log/snmptt/snmptt.debug) as root and forks to non-root uid (snmptt), When it can't reopen debug log because of lacked permissions. This little patch will change ownership of debug log file to non-root uid before dropping root privileges.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matvey Marinin</dc:creator><pubDate>Fri, 14 Oct 2011 08:41:42 -0000</pubDate><guid isPermaLink="false">https://sourceforge.netb4d57f0054d7c945f593798c07579a672d602e1f</guid></item><item><title>New Format: trapname + variable dump</title><link>https://sourceforge.net/p/snmptt/patches/6/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;This patch creates a new format (4) that will translate traps to the following format:&lt;/p&gt;
&lt;p&gt;trapname - variableName1:$1 variableName2:$2 ,,, variableNameN:$N&lt;/p&gt;
&lt;p&gt;I found this format more informative than the default "first description line", especially for CISCO devices.&lt;br /&gt;
Here is one example:&lt;/p&gt;
&lt;p&gt;Format = 0&lt;br /&gt;
FORMAT The disassociate notification shall be sent when the Station $*&lt;/p&gt;
&lt;p&gt;Format = 4&lt;br /&gt;
FORMAT bsnDot11StationDisassociate - bsnStationAPMacAddr:$1 bsnStationAPIfSlotId:$2 bsnStationReasonCode:$3 bsnStationMacAddress:$4&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ricardo Duarte</dc:creator><pubDate>Sun, 31 Jan 2010 13:07:08 -0000</pubDate><guid isPermaLink="false">https://sourceforge.netf7e3a6d60665670bace09334fa81a872880aba27</guid></item><item><title>Fix multi-line traps from NET-SNMP 5.4</title><link>https://sourceforge.net/p/snmptt/patches/5/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;NET-SNMP 5.4.x produces trap files (example attached) that contain multi line values.  The code in snmptt 1.3 did not correctly re-assemble the value.  The end result was $1 contained all variables, instead of properly splitting the attr/value pairs.&lt;/p&gt;
&lt;p&gt;The attached patch fixes the code to account for this.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">AndrewB</dc:creator><pubDate>Wed, 16 Dec 2009 16:32:58 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net73889ed437aa557cc93c08301b12fb9ad60421c5</guid></item><item><title>Bug in snmptt regarding execution of uknonwn traps</title><link>https://sourceforge.net/p/snmptt/patches/4/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;There is a bug on line 3572 in snmptt, regarding&lt;br /&gt;
unknown_trap_exec option. The code is &lt;br /&gt;
$unknown_trap_exec = $cfg-&amp;gt;val('General',&lt;br /&gt;
'unknown_trap_exec');&lt;br /&gt;
whereas it should be &lt;br /&gt;
$unknown_trap_exec = $cfg-&amp;gt;val('Exec',&lt;br /&gt;
'unknown_trap_exec');&lt;/p&gt;
&lt;p&gt;Here is the diff:&lt;br /&gt;
--- snmptt      2006-04-25 14:14:06.000000000 +0300&lt;br /&gt;
+++ snmptt.new  2006-04-25 14:13:34.000000000 +0300&lt;br /&gt;
@@ -3569,7 +3569,7 @@&lt;br /&gt;
$dynamic_nodes = $cfg-&amp;gt;val('General', 'dynamic_nodes');&lt;br /&gt;
$description_mode = $cfg-&amp;gt;val('General',&lt;br /&gt;
'description_mode');&lt;br /&gt;
$description_clean = $cfg-&amp;gt;val('General',&lt;br /&gt;
'description_clean');&lt;br /&gt;
-  $unknown_trap_exec = $cfg-&amp;gt;val('General',&lt;br /&gt;
'unknown_trap_exec');&lt;br /&gt;
+  $unknown_trap_exec = $cfg-&amp;gt;val('Exec',&lt;br /&gt;
'unknown_trap_exec');&lt;/p&gt;
&lt;p&gt;# DaemonMode&lt;br /&gt;
$daemon_fork = $cfg-&amp;gt;val('DaemonMode', 'daemon_fork');&lt;/p&gt;
&lt;p&gt;Another solution would be to move the unknown_trap_exec&lt;br /&gt;
statement, in smptt.ini, for the exec section ([Exec])&lt;br /&gt;
to the general section ([General]).&lt;/p&gt;
&lt;p&gt;George Kourvoulis&lt;br /&gt;
gkourv@gmail.com&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Tue, 25 Apr 2006 11:24:16 -0000</pubDate><guid isPermaLink="false">https://sourceforge.netc8b8d4522c964471dd9bc5d617b182c61f9b119f</guid></item><item><title>Make database logging more robust</title><link>https://sourceforge.net/p/snmptt/patches/3/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;This is a patch against the snmptt that comes in &lt;br /&gt;
snmptt_0.9.tgz.  From reading the other patches, some &lt;br /&gt;
of the changes here may conflict with other recent &lt;br /&gt;
changes checked into CVS but not yet included in a &lt;br /&gt;
distribution.&lt;/p&gt;
&lt;p&gt;This patch makes snmptt&lt;br /&gt;
1. use a subroutine to perform database connect and&lt;br /&gt;
another subroutine for disconnect.&lt;br /&gt;
2. reconnect to databases if there was an error when &lt;br /&gt;
trying to insert.  this makes snmptt tolerate database &lt;br /&gt;
failures/restarts.&lt;br /&gt;
3. disconnect from the database(s) before doing fork().&lt;br /&gt;
Many databases don't tolerate handles being passed &lt;br /&gt;
through fork().&lt;br /&gt;
4. handle the possibility that the database was down &lt;br /&gt;
when snmptt starts in daemon mode.  the previous &lt;br /&gt;
logic tested the $dbh as part of determining whether to &lt;br /&gt;
insert into the database.  if the $dbh was undef, then it &lt;br /&gt;
would not ever increment $trap_attempted_to_log and &lt;br /&gt;
thus would end up throwing away traps without logging &lt;br /&gt;
them to the database.  Now it only tests $dbi_enable to &lt;br /&gt;
see if it should try to log, increments &lt;br /&gt;
$trap_attempted_to_log, and then checks the $dbh &lt;br /&gt;
before doing the insert.&lt;br /&gt;
5. there were several places where messages were &lt;br /&gt;
printed via 'warn' to stderr but not via 'print' (if &lt;br /&gt;
$DEBUGGING) to stdout.  in daemon mode, stdout goes &lt;br /&gt;
to snmptt.debug and stderr goes to /dev/null.  with this &lt;br /&gt;
patch, these messages will be delivered to both stderr &lt;br /&gt;
and stdout if $DEBUGGING.&lt;/p&gt;
&lt;p&gt;I have only tested this patch on Linux using Postgres.  I &lt;br /&gt;
made the same changes for all databases though.  The &lt;br /&gt;
only change I made that was just for Postgres was &lt;br /&gt;
some of the warn vs. print if $DEBUGGING logic at &lt;br /&gt;
database connect time.  It would probably be helpful for &lt;br /&gt;
that to be applied to all the databases.  I needed the &lt;br /&gt;
debugging trace because syslog didn't seem to be &lt;br /&gt;
working for me after the fork().  I haven't investigated &lt;br /&gt;
too much though as I'm happy with where I have &lt;br /&gt;
things now.&lt;/p&gt;
&lt;p&gt;These changes were made by me, mike@mccartney.net,&lt;br /&gt;
while under a contract with Vieo, Inc.&lt;br /&gt;
&lt;a href="http://www.vieo.com/" rel="nofollow"&gt;http://www.vieo.com/&lt;/a&gt; who agreed that I should submit &lt;br /&gt;
this patch back to the snmptt project.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;br /&gt;
Mike McCartney&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Tue, 20 Jul 2004 16:03:20 -0000</pubDate><guid isPermaLink="false">https://sourceforge.netbfb30125cfcd3e4c771bf6243c76eb00843073f9</guid></item><item><title>new variable substitution: $D (DESCRIPTION) on FORMAT line</title><link>https://sourceforge.net/p/snmptt/patches/2/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I have written a patch to add new variable substitution: &lt;br /&gt;
$D (DESCRIPTION) on FORMAT line.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Toshiyuki Haginaga</dc:creator><pubDate>Fri, 04 Jun 2004 11:26:10 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net992bb152cffd16f9692dc893b5f1058de742b548</guid></item><item><title>Fixed a problem using the MySQL and snmptt in daemon mode</title><link>https://sourceforge.net/p/snmptt/patches/1/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;The snmptt version 0.9 connect to the mysql server &lt;br /&gt;
before forking when it use the mysql in daemon mode.&lt;br /&gt;
And then a child proccess do not have a connection to &lt;br /&gt;
the mysql server.&lt;br /&gt;
Therefore the snmptt can not insert a log into the mysql &lt;br /&gt;
database.&lt;/p&gt;
&lt;p&gt;I have written a patch for that problem.&lt;br /&gt;
This patch fixed that problem.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Fri, 04 Jun 2004 11:08:24 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net152e071bd085fc3e60fba9b2630e27f4a90f7c29</guid></item></channel></rss>