Hello community,
here is the log from the commit of package net-snmp
checked in at Tue May 9 00:48:03 CEST 2006.
--------
--- net-snmp/net-snmp.changes 2006-04-20 16:50:38.000000000 +0200
+++ STABLE/net-snmp/net-snmp.changes 2006-05-04 17:17:49.000000000 +0200
@@ -1,0 +2,15 @@
+Thu May 4 17:05:26 CEST 2006 - mrueckert@suse.de
+
+- added net-snmp-5.3.0.1_sighup_vacm.patch:
+ The snmp agent was broken on SIGHUP. It lost all its MIB
+ informations. (upstream bug: #1473289)
+- added net-snmp-5.3.0.1_deprecated_sysctl_retrans_time.patch:
+ The snmpd used a deprecated sysctl to get the retransmit time
+ from the kernel. We didnt use this module but the mib library
+ triggered the sysctl. The patch uses retrans_time_ms when
+ available and corrects the correction factor for the old sysctl.
+ (bug: #170140, upstream: #1437287)
+- reenabled the lmsensors support. was disabled for testing and
+ never reenabled.
+
+-------------------------------------------------------------------
New:
----
net-snmp-5.3.0.1_deprecated_sysctl_retrans_time.patch
net-snmp-5.3.0.1_sighup_vacm.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ net-snmp.spec ++++++
--- /var/tmp/diff_new_pack.ewhTia/_old 2006-05-09 00:47:24.000000000 +0200
+++ /var/tmp/diff_new_pack.ewhTia/_new 2006-05-09 00:47:24.000000000 +0200
@@ -11,10 +11,10 @@
Name: net-snmp
%define netsnmp_logfile /var/log/net-snmpd.log
-BuildRequires: openssl-devel rpm-devel tcpd-devel
+BuildRequires: openssl-devel rpm-devel sensors tcpd-devel
License: Other License(s), see package
Version: 5.3.0.1
-Release: 19
+Release: 24
Summary: SNMP Daemon
Group: Productivity/Networking/Other
URL: http://sourceforge.net/projects/net-snmp
@@ -58,6 +58,8 @@
Patch42: net-snmp-5.3.0.1_ethtool.patch
Patch43: net-snmp-5.3.0.1_testsuite_no_smux.patch
Patch44: net-snmp-5.3.0.1_missing_ifNumber.patch
+Patch45: net-snmp-5.3.0.1_sighup_vacm.patch
+Patch46: net-snmp-5.3.0.1_deprecated_sysctl_retrans_time.patch
Patch60: oid-names2_5.3.patch
%description
@@ -135,6 +137,8 @@
%patch42
%patch43
%patch44
+%patch45
+%patch46
#%patch60
find -name "CVS" -type d | xargs -r %{__rm} -rfv
find -name ".cvsignore" | xargs -r %{__rm} -fv
@@ -142,12 +146,12 @@
%build
autoconf
-# possibly add ucd-snmp/lmSensors later
-export CFLAGS="%{optflags} -g -fno-strict-aliasing -fstack-protector-all"
-#export CFLAGS="${CFLAGS//-O2/-O0}"
+# possibly add later
+# ip-mib/ipv4InterfaceTable ip-mib/ipv6InterfaceTable
+export CFLAGS="%{optflags} -fno-strict-aliasing -fstack-protector-all"
%configure \
--with-sys-contact="root@localhost" \
- --with-mib-modules="host ucd-snmp/pass_persist misc/ipfwacc smux ucd-snmp/diskio" \
+ --with-mib-modules="host ucd-snmp/pass_persist misc/ipfwacc smux ucd-snmp/diskio ucd-snmp/lmSensors" \
--with-persistent-directory=/var/lib/net-snmp \
--with-sys-location="unknown" \
--with-logfile=%{netsnmp_logfile} \
@@ -312,6 +316,18 @@
%{_bindir}/mib2c-update
%changelog -n net-snmp
+* Thu May 04 2006 - mrueckert@suse.de
+- added net-snmp-5.3.0.1_sighup_vacm.patch:
+ The snmp agent was broken on SIGHUP. It lost all its MIB
+ informations. (upstream bug: #1473289)
+- added net-snmp-5.3.0.1_deprecated_sysctl_retrans_time.patch:
+ The snmpd used a deprecated sysctl to get the retransmit time
+ from the kernel. We didnt use this module but the mib library
+ triggered the sysctl. The patch uses retrans_time_ms when
+ available and corrects the correction factor for the old sysctl.
+ (bug: #170140, upstream: #1437287)
+- reenabled the lmsensors support. was disabled for testing and
+ never reenabled.
* Thu Apr 20 2006 - mrueckert@suse.de
- net-snmp-5.3.0.1_missing_ifNumber.patch:
The 5.3 agent on Linux systems did not implement the 'ifNumber'
++++++ net-snmp-5.3.0.1_deprecated_sysctl_retrans_time.patch ++++++
Index: agent/mibgroup/if-mib/data_access/interface_linux.c
===================================================================
--- agent/mibgroup/if-mib/data_access/interface_linux.c.orig
+++ agent/mibgroup/if-mib/data_access/interface_linux.c
@@ -22,6 +22,8 @@
#include "interface_ioctl.h"
#include
+#include
+#include
#ifdef HAVE_LINUX_ETHTOOL_H
#include
@@ -40,6 +42,10 @@ unsigned int
netsnmp_linux_interface_get_if_speed_mii(int fd, const char *name);
#endif
+#define PROC_SYS_NET_IPVx_NEIGH_RETRANS_TIME_MS "/proc/sys/net/ipv%d/neigh/%s/retrans_time_ms"
+#define PROC_SYS_NET_IPVx_NEIGH_RETRANS_TIME "/proc/sys/net/ipv%d/neigh/%s/retrans_time"
+static char *proc_sys_retrans_time;
+static unsigned short retrans_time_factor = 0;
void
netsnmp_arch_interface_init(void)
@@ -47,6 +53,20 @@ netsnmp_arch_interface_init(void)
/*
* nothing to do
*/
+ char proc_path[64+IF_NAMESIZE];
+ char proc_path2[64+IF_NAMESIZE];
+ struct stat st;
+
+ snprintf(proc_path, sizeof(proc_path), PROC_SYS_NET_IPVx_NEIGH_RETRANS_TIME_MS, 6, "default");
+ snprintf(proc_path2, sizeof(proc_path2), PROC_SYS_NET_IPVx_NEIGH_RETRANS_TIME_MS, 4, "default");
+
+ if ((stat(proc_path, &st) == 0) || (stat(proc_path2, &st) == 0)) {
+ proc_sys_retrans_time = PROC_SYS_NET_IPVx_NEIGH_RETRANS_TIME_MS;
+ }
+ else {
+ proc_sys_retrans_time = PROC_SYS_NET_IPVx_NEIGH_RETRANS_TIME;
+ retrans_time_factor = 10;
+ }
}
/*
@@ -161,7 +181,7 @@ _arch_interface_flags_v4_get(netsnmp_int
/*
* get the retransmit time
*/
- snprintf(line,sizeof(line),"/proc/sys/net/ipv4/neigh/%s/retrans_time",
+ snprintf(line,sizeof(line),proc_sys_retrans_time, 4,
entry->name);
if (!(fin = fopen(line, "r"))) {
DEBUGMSGTL(("access:interface",
@@ -169,7 +189,12 @@ _arch_interface_flags_v4_get(netsnmp_int
}
else {
if (fgets(line, sizeof(line), fin)) {
- entry->retransmit_v4 = atoi(line) * 100;
+ if (retrans_time_factor) {
+ entry->retransmit_v4 = atoi(line) * retrans_time_factor;
+ }
+ else {
+ entry->retransmit_v4 = atoi(line);
+ };
entry->ns_flags |= NETSNMP_INTERFACE_FLAGS_HAS_V4_RETRANSMIT;
}
fclose(fin);
@@ -191,7 +216,7 @@ _arch_interface_flags_v6_get(netsnmp_int
/*
* get the retransmit time
*/
- snprintf(line,sizeof(line),"/proc/sys/net/ipv6/neigh/%s/retrans_time",
+ snprintf(line,sizeof(line),proc_sys_retrans_time, 6,
entry->name);
if (!(fin = fopen(line, "r"))) {
DEBUGMSGTL(("access:interface",
@@ -199,7 +224,12 @@ _arch_interface_flags_v6_get(netsnmp_int
}
else {
if (fgets(line, sizeof(line), fin)) {
- entry->retransmit_v6 = atoi(line);
+ if (retrans_time_factor) {
+ entry->retransmit_v6 = atoi(line) * retrans_time_factor;
+ }
+ else {
+ entry->retransmit_v6 = atoi(line);
+ };
entry->ns_flags |= NETSNMP_INTERFACE_FLAGS_HAS_V6_RETRANSMIT;
}
fclose(fin);
++++++ net-snmp-5.3.0.1_missing_ifNumber.patch ++++++
--- /var/tmp/diff_new_pack.ewhTia/_old 2006-05-09 00:47:24.000000000 +0200
+++ /var/tmp/diff_new_pack.ewhTia/_new 2006-05-09 00:47:24.000000000 +0200
@@ -2,11 +2,8 @@
Index: agent/mibgroup/if-mib/ifTable/ifTable.c
===================================================================
-RCS file: /cvsroot/net-snmp/net-snmp/agent/mibgroup/if-mib/ifTable/ifTable.c,v
-retrieving revision 1.25
-diff -u -p -r1.25 ifTable.c
---- agent/mibgroup/if-mib/ifTable/ifTable.c 25 Jan 2006 16:25:54 -0000 1.25
-+++ agent/mibgroup/if-mib/ifTable/ifTable.c 13 Feb 2006 23:49:45 -0000
+--- agent/mibgroup/if-mib/ifTable/ifTable.c.orig
++++ agent/mibgroup/if-mib/ifTable/ifTable.c
@@ -44,6 +44,12 @@ ifTable_registration ifTable_user_contex
void initialize_table_ifTable(void);
void shutdown_table_ifTable(void);
@@ -45,7 +42,7 @@
} /* initialize_table_ifTable */
/**
-@@ -2302,5 +2326,26 @@ ifTable_check_dependencies(ifTable_rowre
+@@ -2307,5 +2331,26 @@ ifTable_check_dependencies(ifTable_rowre
return rc;
} /* ifTable_check_dependencies */
@@ -74,11 +71,8 @@
/** @{ */
Index: agent/mibgroup/if-mib/ifTable/ifTable_constants.h
===================================================================
-RCS file: /cvsroot/net-snmp/net-snmp/agent/mibgroup/if-mib/ifTable/ifTable_constants.h,v
-retrieving revision 1.9
-diff -u -p -r1.9 ifTable_constants.h
---- agent/mibgroup/if-mib/ifTable/ifTable_constants.h 29 Nov 2005 22:14:32 -0000 1.9
-+++ agent/mibgroup/if-mib/ifTable/ifTable_constants.h 13 Feb 2006 23:49:45 -0000
+--- agent/mibgroup/if-mib/ifTable/ifTable_constants.h.orig
++++ agent/mibgroup/if-mib/ifTable/ifTable_constants.h
@@ -15,6 +15,7 @@ extern "C" {
* scalars
*/
++++++ net-snmp-5.3.0.1_sighup_vacm.patch ++++++
https://sourceforge.net/tracker/index.php?func=detail&aid=1473289&group_id=12694&atid=456380
Index: agent/agent_read_config.c
===================================================================
--- agent/agent_read_config.c.orig
+++ agent/agent_read_config.c
@@ -273,6 +273,7 @@ update_config(void)
snmp_call_callbacks(SNMP_CALLBACK_APPLICATION,
SNMPD_CALLBACK_PRE_UPDATE_CONFIG, NULL);
free_config();
+ vacm_standard_views(0,0,NULL,NULL);
read_configs();
}
Index: apps/snmptrapd.c
===================================================================
--- apps/snmptrapd.c.orig
+++ apps/snmptrapd.c
@@ -1304,6 +1304,7 @@ void
trapd_update_config(void)
{
free_config();
+ vacm_standard_views(0,0,NULL,NULL);
read_configs();
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...