[Pkg-net-snmp-commits] r269 - branches/net-snmp54/debian branches/net-snmp54/debian/patches branches/net-snmp54-dev/debian/patches trunk/debian/patches
Jochen Friedrich
jochen at alioth.debian.org
Fri Jul 31 19:26:32 UTC 2009
Author: jochen
Date: 2009-07-31 19:26:32 +0000 (Fri, 31 Jul 2009)
New Revision: 269
Removed:
branches/net-snmp54/debian/patches/41_snmptrapd_close_handles.README
branches/net-snmp54/debian/patches/41_snmptrapd_close_handles.patch
branches/net-snmp54/debian/patches/43_snmp_logging.README
branches/net-snmp54/debian/patches/43_snmp_logging.patch
branches/net-snmp54/debian/patches/45_process_race.README
branches/net-snmp54/debian/patches/45_process_race.patch
branches/net-snmp54/debian/patches/46_ifname_crop.README
branches/net-snmp54/debian/patches/46_ifname_crop.patch
branches/net-snmp54/debian/patches/47_prevent_partial_inserts.README
branches/net-snmp54/debian/patches/47_prevent_partial_inserts.patch
branches/net-snmp54/debian/patches/48_cve2008_2292_perl.README
branches/net-snmp54/debian/patches/48_cve2008_2292_perl.patch
branches/net-snmp54/debian/patches/49_cve2008_2292_python.README
branches/net-snmp54/debian/patches/49_cve2008_2292_python.patch
branches/net-snmp54/debian/patches/50_cve2008_0960.README
branches/net-snmp54/debian/patches/50_cve2008_0960.patch
branches/net-snmp54/debian/patches/51_allow_g_groupname.README
branches/net-snmp54/debian/patches/51_allow_g_groupname.patch
branches/net-snmp54/debian/patches/52_suppress_registration_warnings.README
branches/net-snmp54/debian/patches/52_suppress_registration_warnings.patch
branches/net-snmp54/debian/patches/53_fix_python_regression.README
branches/net-snmp54/debian/patches/53_fix_python_regression.patch
branches/net-snmp54/debian/patches/54_fix_xen.README
branches/net-snmp54/debian/patches/54_fix_xen.patch
branches/net-snmp54/debian/patches/55_cve2008_4309.README
branches/net-snmp54/debian/patches/55_cve2008_4309.patch
Modified:
branches/net-snmp54-dev/debian/patches/25_duplicate_iftable.patch
branches/net-snmp54-dev/debian/patches/31_silence_subcontainer.README
branches/net-snmp54-dev/debian/patches/31_silence_subcontainer.patch
branches/net-snmp54/debian/changelog
branches/net-snmp54/debian/patches/25_duplicate_iftable.patch
branches/net-snmp54/debian/patches/31_silence_subcontainer.README
branches/net-snmp54/debian/patches/31_silence_subcontainer.patch
trunk/debian/patches/25_duplicate_iftable.patch
Log:
Update to 5.4.2.1
Modified: branches/net-snmp54/debian/changelog
===================================================================
--- branches/net-snmp54/debian/changelog 2009-07-19 18:24:32 UTC (rev 268)
+++ branches/net-snmp54/debian/changelog 2009-07-31 19:26:32 UTC (rev 269)
@@ -1,3 +1,28 @@
+net-snmp (5.4.2.1~dfsg-1) unstable; urgency=low
+
+ * New upstream version
+ - includes patch for CVE-2008-6123 (Closes: #516801)
+ * remove patches applied upstream:
+ - 55_cve2008_4309.patch
+ - 54_fix_xen.patch
+ - 53_fix_python_regression.patch
+ - 52_suppress_registration_warnings.patch
+ - 51_allow_g_groupname.patch
+ - 50_cve2008_0960.patch
+ - 49_cve2008_2292_python.patch
+ - 48_cve2008_2292_perl.patch
+ - 47_prevent_partial_inserts.patch
+ - 46_ifname_crop.patch
+ - 45_process_race.patch
+ - 43_snmp_logging.patch
+ - 41_snmptrapd_close_handles.patch
+ * Updated patches:
+ - 31_silence_subcontainer.patch: Use upstream changeset 17254
+ - 25_duplicate_iftable.patch: Regenerated
+ * Removed non-free MIBS from distribution (Closes: #498475)
+
+ -- Jochen Friedrich <jochen at scram.de> Fri, 31 Jul 2009 16:29:44 +0200
+
net-snmp (5.4.1~dfsg-12) unstable; urgency=high
* Urgency high because of RC bug fix.
Modified: branches/net-snmp54/debian/patches/25_duplicate_iftable.patch
===================================================================
--- branches/net-snmp54/debian/patches/25_duplicate_iftable.patch 2009-07-19 18:24:32 UTC (rev 268)
+++ branches/net-snmp54/debian/patches/25_duplicate_iftable.patch 2009-07-31 19:26:32 UTC (rev 269)
@@ -1,26 +1,27 @@
-diff -ur net-snmp-5.3.0.1/agent/mibgroup/if-mib/data_access/interface.c net-snmp-5.3.0.1-dynamic-if-fix/agent/mibgroup/if-mib/data_access/interface.c
---- net-snmp-5.3.0.1/agent/mibgroup/if-mib/data_access/interface.c 2005-10-29 05:21:16.000000000 +0200
-+++ net-snmp-5.3.0.1-dynamic-if-fix/agent/mibgroup/if-mib/data_access/interface.c 2006-06-29 11:55:29.213757052 +0200
-@@ -464,8 +464,13 @@
- DEBUGMSGTL(("access:interface:ifIndex", "saved ifIndex %d for %s\n",
- index, name));
- }
-- else
-- netsnmp_assert(index == tmp);
-+ else {
-+ if(index != tmp) {
-+ se_remove_value_from_slist("interfaces", name);
-+ se_add_pair_to_slist("interfaces", strdup(name), index);
-+ DEBUGMSGTL(("access:interface:ifIndex", "ifname %s, old index %d, already existing, replaced with %d\n", name, tmp, index));
-+ }
-+ }
+diff -ru net-snmp-5.4.2.1.orig/agent/mibgroup/if-mib/data_access/interface.c net-snmp-5.4.2.1/agent/mibgroup/if-mib/data_access/interface.c
+--- net-snmp-5.4.2.1.orig/agent/mibgroup/if-mib/data_access/interface.c 2008-02-23 00:52:33.000000000 +0100
++++ net-snmp-5.4.2.1/agent/mibgroup/if-mib/data_access/interface.c 2009-07-31 17:10:49.000000000 +0200
+@@ -469,12 +469,12 @@
+ if (index != tmp) {
+ static int logged = 0;
+ if (!logged) {
+- snmp_log(LOG_ERR, "IfIndex of an interface changed. Such " \
+- "interfaces will appear multiple times in IF-MIB.\n");
++ snmp_log(LOG_ERR, "IfIndex of an interface changed.\n");
+ logged = 1;
+ }
+- DEBUGMSGTL(("access:interface:ifIndex", "index %d != tmp for %s\n",
+- index, name));
++ se_remove_value_from_slist("interfaces", name);
++ se_add_pair_to_slist("interfaces", strdup(name), index);
++ DEBUGMSGTL(("access:interface:ifIndex", "ifname %s, old index %d, already existing, replaced with %d\n", name, tmp, index));
+ }
}
- /**
-diff -ur net-snmp-5.3.0.1/agent/mibgroup/if-mib/ifTable/ifTable_data_access.c net-snmp-5.3.0.1-dynamic-if-fix/agent/mibgroup/if-mib/ifTable/ifTable_data_access.c
---- net-snmp-5.3.0.1/agent/mibgroup/if-mib/ifTable/ifTable_data_access.c 2005-12-06 18:44:11.000000000 +0100
-+++ net-snmp-5.3.0.1-dynamic-if-fix/agent/mibgroup/if-mib/ifTable/ifTable_data_access.c 2006-06-29 11:30:42.847486426 +0200
-@@ -235,8 +235,21 @@
+diff -ru net-snmp-5.4.2.1.orig/agent/mibgroup/if-mib/ifTable/ifTable_data_access.c net-snmp-5.4.2.1/agent/mibgroup/if-mib/ifTable/ifTable_data_access.c
+--- net-snmp-5.4.2.1.orig/agent/mibgroup/if-mib/ifTable/ifTable_data_access.c 2008-02-12 20:05:24.000000000 +0100
++++ net-snmp-5.4.2.1/agent/mibgroup/if-mib/ifTable/ifTable_data_access.c 2009-07-31 17:04:17.000000000 +0200
+@@ -266,8 +266,21 @@
_add_new_interface(netsnmp_interface_entry *ifentry,
netsnmp_container *container)
{
@@ -44,9 +45,10 @@
DEBUGMSGTL(("ifTable:access", "creating new entry\n"));
/*
-diff -ur net-snmp-5.3.0.1/snmplib/snmp_enum.c net-snmp-5.3.0.1-dynamic-if-fix/snmplib/snmp_enum.c
---- net-snmp-5.3.0.1/snmplib/snmp_enum.c 2005-02-09 20:46:09.000000000 +0100
-+++ net-snmp-5.3.0.1-dynamic-if-fix/snmplib/snmp_enum.c 2006-06-26 06:14:10.884859703 +0200
+Nur in net-snmp-5.4.2.1/agent/mibgroup/if-mib/ifTable: ifTable_data_access.c.orig.
+diff -ru net-snmp-5.4.2.1.orig/snmplib/snmp_enum.c net-snmp-5.4.2.1/snmplib/snmp_enum.c
+--- net-snmp-5.4.2.1.orig/snmplib/snmp_enum.c 2005-02-09 20:46:35.000000000 +0100
++++ net-snmp-5.4.2.1/snmplib/snmp_enum.c 2009-07-31 17:04:17.000000000 +0200
@@ -213,6 +213,27 @@
return SE_DNE; /* XXX: um, no good solution here */
}
Modified: branches/net-snmp54/debian/patches/31_silence_subcontainer.README
===================================================================
--- branches/net-snmp54/debian/patches/31_silence_subcontainer.README 2009-07-19 18:24:32 UTC (rev 268)
+++ branches/net-snmp54/debian/patches/31_silence_subcontainer.README 2009-07-31 19:26:32 UTC (rev 269)
@@ -1 +1,3 @@
-Stop syslog spam about subcontainer insert error.
+Upstream Change 17254:
+
+CHANGES: snmpd: BUG: 1693039: be silent when insert fails.
Modified: branches/net-snmp54/debian/patches/31_silence_subcontainer.patch
===================================================================
--- branches/net-snmp54/debian/patches/31_silence_subcontainer.patch 2009-07-19 18:24:32 UTC (rev 268)
+++ branches/net-snmp54/debian/patches/31_silence_subcontainer.patch 2009-07-31 19:26:32 UTC (rev 269)
@@ -1,13 +1,26 @@
---- net-snmp-5.3.1.orig/include/net-snmp/library/container.h 2004-09-14 04:29:16.000000000 +0200
-+++ net-snmp-5.3.1/include/net-snmp/library/container.h 2006-12-20 17:25:58.000000000 +0100
-@@ -364,8 +364,8 @@
- continue;
- rc2 = x->insert(x,k);
- if (rc2) {
+Index: snmplib/container.c
+===================================================================
+--- net-snmp-5.4.2.1.orig/snmplib/container.c (Revision 17253)
++++ net-snmp-5.4.2.1/snmplib/container.c (Revision 17254)
+@@ -275,7 +275,7 @@
+ if(x) {
+ int rc = x->insert(x,k);
+ if(rc)
+- snmp_log(LOG_ERR,"error on subcontainer '%s' insert (%d)\n",
++ snmp_log(LOG_DEBUG,"error on subcontainer '%s' insert (%d)\n",
+ x->container_name ? x->container_name : "", rc);
+ else {
+ rc = CONTAINER_INSERT_HELPER(x->next, k);
+Index: include/net-snmp/library/container.h
+===================================================================
+--- net-snmp-5.4.2.1.orig/include/net-snmp/library/container.h (Revision 17253)
++++ net-snmp-5.4.2.1/include/net-snmp/library/container.h (Revision 17254)
+@@ -358,7 +358,7 @@
+ if(x) {
+ int rc = x->insert(x,k);
+ if(rc)
- snmp_log(LOG_ERR,"error on subcontainer '%s' insert (%d)\n",
-- x->container_name ? x->container_name : "", rc2);
-+/* snmp_log(LOG_ERR,"error on subcontainer '%s' insert (%d)\n",
-+ x->container_name ? x->container_name : "", rc2); */
- rc = rc2;
- }
- }
++ snmp_log(LOG_DEBUG,"error on subcontainer '%s' insert (%d)\n",
+ x->container_name ? x->container_name : "", rc);
+ else {
+ rc = CONTAINER_INSERT_HELPER(x->next, k);
Deleted: branches/net-snmp54/debian/patches/41_snmptrapd_close_handles.README
===================================================================
--- branches/net-snmp54/debian/patches/41_snmptrapd_close_handles.README 2009-07-19 18:24:32 UTC (rev 268)
+++ branches/net-snmp54/debian/patches/41_snmptrapd_close_handles.README 2009-07-31 19:26:32 UTC (rev 269)
@@ -1 +0,0 @@
-Close all non standard file handles in snmptrapd.c (copied from snmpd.c)
Deleted: branches/net-snmp54/debian/patches/41_snmptrapd_close_handles.patch
===================================================================
--- branches/net-snmp54/debian/patches/41_snmptrapd_close_handles.patch 2009-07-19 18:24:32 UTC (rev 268)
+++ branches/net-snmp54/debian/patches/41_snmptrapd_close_handles.patch 2009-07-31 19:26:32 UTC (rev 269)
@@ -1,19 +0,0 @@
---- net-snmp-5.3.1/apps/snmptrapd.c.orig 2007-07-06 17:02:00.000000000 +0200
-+++ net-snmp-5.3.1/apps/snmptrapd.c 2007-07-31 16:45:38.000000000 +0200
-@@ -596,6 +596,16 @@
- #endif
- netsnmp_trapd_handler *traph;
-
-+#ifndef WIN32
-+ /*
-+ * close all non-standard file descriptors we may have
-+ * inherited from the shell.
-+ */
-+ for (i = getdtablesize() - 1; i > 2; --i) {
-+ (void) close(i);
-+ }
-+#endif /* #WIN32 */
-+
- #ifdef SIGTERM
- signal(SIGTERM, term_handler);
- #endif
Deleted: branches/net-snmp54/debian/patches/43_snmp_logging.README
===================================================================
--- branches/net-snmp54/debian/patches/43_snmp_logging.README 2009-07-19 18:24:32 UTC (rev 268)
+++ branches/net-snmp54/debian/patches/43_snmp_logging.README 2009-07-31 19:26:32 UTC (rev 269)
@@ -1 +0,0 @@
-Upstream Changeset 16721: snmplib: PATCH: 1806336: fix -LS option parsing
Deleted: branches/net-snmp54/debian/patches/43_snmp_logging.patch
===================================================================
--- branches/net-snmp54/debian/patches/43_snmp_logging.patch 2009-07-19 18:24:32 UTC (rev 268)
+++ branches/net-snmp54/debian/patches/43_snmp_logging.patch 2009-07-31 19:26:32 UTC (rev 269)
@@ -1,21 +0,0 @@
---- net-snmp-5.4.1.orig/snmplib/snmp_logging.c 2006/12/04 17:54:15 15632
-+++ net-snmp-5.4.1/snmplib/snmp_logging.c 2007/10/14 19:07:24 16721
-@@ -179,6 +179,9 @@
- {
- int pri_low = LOG_DEBUG;
-
-+ if (optarg == NULL)
-+ return -1;
-+
- switch (*optarg) {
- case '0':
- case '!':
-@@ -384,7 +387,7 @@
- case 'S':
- priority = decode_priority( optarg, &pri_max );
- if (priority == -1 || !argv) return -1;
-- optarg = argv[++optind];
-+ optarg++;
- /* Fallthrough */
- case 's':
- if (inc_optind)
Deleted: branches/net-snmp54/debian/patches/45_process_race.README
===================================================================
--- branches/net-snmp54/debian/patches/45_process_race.README 2009-07-19 18:24:32 UTC (rev 268)
+++ branches/net-snmp54/debian/patches/45_process_race.README 2009-07-31 19:26:32 UTC (rev 269)
@@ -1,2 +0,0 @@
-Upstream Changeset 16705: snmpd: PATCH: 1746831: from cunnijd: fix process
-checking race condition under Linux and platform #ifdefs
Deleted: branches/net-snmp54/debian/patches/45_process_race.patch
===================================================================
--- branches/net-snmp54/debian/patches/45_process_race.patch 2009-07-19 18:24:32 UTC (rev 268)
+++ branches/net-snmp54/debian/patches/45_process_race.patch 2009-07-31 19:26:32 UTC (rev 269)
@@ -1,48 +0,0 @@
-diff -upr net-snmp-5.4.1/agent/mibgroup/ucd-snmp/proc.c net-snmp-5.4.1.patch/agent/mibgroup/ucd-snmp/proc.c
---- net-snmp-5.4.1/agent/mibgroup/ucd-snmp/proc.c 2007-03-12 12:56:39.000000000 -0700
-+++ net-snmp-5.4.1.patch/agent/mibgroup/ucd-snmp/proc.c 2007-09-20 09:55:35.000000000 -0700
-@@ -427,7 +427,7 @@ sh_count_procs(char *procname)
- return count;
- }
-
--#elif OSTYPE == NETSNMP_LINUXID
-+#elif NETSNMP_OSTYPE == NETSNMP_LINUXID
-
- #include <dirent.h>
- #include <fcntl.h>
-@@ -452,7 +452,7 @@ sh_count_procs(char *procname)
- #ifdef USE_PROC_CMDLINE /* old method */
- /* read /proc/XX/cmdline */
- sprintf(cmdline,"/proc/%s/cmdline",ent->d_name);
-- if((fd = open(cmdline, O_RDONLY)) < 0) break;
-+ if((fd = open(cmdline, O_RDONLY)) < 0) continue;
- len = read(fd,cmdline,sizeof(cmdline) - 1);
- close(fd);
- if(len <= 0) continue;
-@@ -464,7 +464,7 @@ sh_count_procs(char *procname)
- /* read /proc/XX/status */
- sprintf(cmdline,"/proc/%s/status",ent->d_name);
- if ((status = fopen(cmdline, "r")) == NULL)
-- break;
-+ continue;
- if (fgets(cmdline, sizeof(cmdline), status) == NULL) {
- fclose(status);
- break;
-@@ -507,7 +507,7 @@ sh_count_procs(char *procname)
- return total;
- }
-
--#elif OSTYPE == NETSNMP_ULTRIXID
-+#elif NETSNMP_OSTYPE == NETSNMP_ULTRIXID
-
- #define NPROCS 32 /* number of proces to read at once */
-
-@@ -688,7 +688,7 @@ getstruct(off_t loc, char *name, off_t d
- return (0);
- return (1);
- }
--#elif OSTYPE == NETSNMP_SOLARISID
-+#elif NETSNMP_OSTYPE == NETSNMP_SOLARISID
-
- #ifdef _SLASH_PROC_METHOD_
-
Deleted: branches/net-snmp54/debian/patches/46_ifname_crop.README
===================================================================
--- branches/net-snmp54/debian/patches/46_ifname_crop.README 2009-07-19 18:24:32 UTC (rev 268)
+++ branches/net-snmp54/debian/patches/46_ifname_crop.README 2009-07-31 19:26:32 UTC (rev 269)
@@ -1 +0,0 @@
-Upstream Changeset 16797: snmpd: PATCH: 1826102: from jsafranek: support longer interface names on linux
Deleted: branches/net-snmp54/debian/patches/46_ifname_crop.patch
===================================================================
--- branches/net-snmp54/debian/patches/46_ifname_crop.patch 2009-07-19 18:24:32 UTC (rev 268)
+++ branches/net-snmp54/debian/patches/46_ifname_crop.patch 2009-07-31 19:26:32 UTC (rev 269)
@@ -1,41 +0,0 @@
---- net-snmp-5.4.1~dfsg.orig/include/net-snmp/library/tools.h (Revision 16796)
-+++ net-snmp-5.4.1~dfsg/include/net-snmp/library/tools.h (Revision 16797)
-@@ -88,6 +88,17 @@
- Computers the minimum of a and b. */
- #define SNMP_MIN(a,b) ((a) > (b) ? (b) : (a))
-
-+/** @def SNMP_MACRO_VAL_TO_STR(s)
-+ * Expands to string with value of the s.
-+ * If s is macro, the resulting string is value of the macro.
-+ * Example:
-+ * #define TEST 1234
-+ * SNMP_MACRO_VAL_TO_STR(TEST) expands to "1234"
-+ * SNMP_MACRO_VAL_TO_STR(TEST+1) expands to "1234+1"
-+ */
-+#define SNMP_MACRO_VAL_TO_STR(s) SNMP_MACRO_VAL_TO_STR_PRIV(s)
-+#define SNMP_MACRO_VAL_TO_STR_PRIV(s) #s
-+
- #ifndef FALSE
- #define FALSE 0
- #endif
---- net-snmp-5.4.1~dfsg.orig/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c (Revision 16796)
-+++ net-snmp-5.4.1~dfsg/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c (Revision 16797)
-@@ -180,7 +180,8 @@
- _load_v6(netsnmp_container *container, int idx_offset)
- {
- FILE *in;
-- char line[80], addr[40], if_name[IFNAMSIZ];
-+ char line[80], addr[40];
-+ char if_name[IFNAMSIZ+1];/* +1 for '\0' because of the ugly sscanf below */
- u_char *buf;
- int if_index, pfx_len, scope, flags, rc = 0;
- size_t in_len, out_len;
-@@ -219,7 +220,7 @@
- * F: flags (see include/linux/rtnetlink.h, net/ipv6/addrconf.c)
- * I: interface
- */
-- rc = sscanf(line, "%39s %02x %02x %02x %02x %8s\n",
-+ rc = sscanf(line, "%39s %02x %02x %02x %02x %" SNMP_MACRO_VAL_TO_STR(IFNAMSIZ) "s\n",
- addr, &if_index, &pfx_len, &scope, &flags, if_name);
- if( 6 != rc ) {
- snmp_log(LOG_ERR, PROCFILE " data format error (%d!=6), line ==|%s|\n",
Deleted: branches/net-snmp54/debian/patches/47_prevent_partial_inserts.README
===================================================================
--- branches/net-snmp54/debian/patches/47_prevent_partial_inserts.README 2009-07-19 18:24:32 UTC (rev 268)
+++ branches/net-snmp54/debian/patches/47_prevent_partial_inserts.README 2009-07-31 19:26:32 UTC (rev 269)
@@ -1,3 +0,0 @@
-Upstream Changeset 16804:
-snmplib: Change CONTAINER_INSERT to not do partial inserts in containers with
-multiple indices when one insert fails.
Deleted: branches/net-snmp54/debian/patches/47_prevent_partial_inserts.patch
===================================================================
--- branches/net-snmp54/debian/patches/47_prevent_partial_inserts.patch 2009-07-19 18:24:32 UTC (rev 268)
+++ branches/net-snmp54/debian/patches/47_prevent_partial_inserts.patch 2009-07-31 19:26:32 UTC (rev 269)
@@ -1,126 +0,0 @@
-Index: net-snmp/snmplib/container.c
-===================================================================
---- net-snmp/snmplib/container.c (Revision 16803)
-+++ net-snmp/snmplib/container.c (Revision 16804)
-@@ -268,31 +268,41 @@
- * These functions should EXACTLY match the inline version in
- * container.h. If you change one, change them both.
- */
--int CONTAINER_INSERT(netsnmp_container *x, const void *k)
--{
-- int rc2, rc = 0;
--
-- /** start at first container */
-- while(x->prev)
-- x = x->prev;
-- for(; x; x = x->next) {
-- if ((NULL != x->insert_filter) &&
-- (x->insert_filter(x,k) == 1))
-- continue;
-- rc2 = x->insert(x,k);
-- if (rc2) {
-+int CONTAINER_INSERT_HELPER(netsnmp_container* x, const void* k)
-+{
-+ while(x && x->insert_filter && x->insert_filter(x,k) == 1)
-+ x = x->next;
-+ if(x) {
-+ int rc = x->insert(x,k);
-+ if(rc)
- snmp_log(LOG_ERR,"error on subcontainer '%s' insert (%d)\n",
-- x->container_name ? x->container_name : "", rc2);
-- rc = rc2;
-+ x->container_name ? x->container_name : "", rc);
-+ else {
-+ rc = CONTAINER_INSERT_HELPER(x->next, k);
-+ if(rc)
-+ x->remove(x,k);
- }
-+ return rc;
- }
-- return rc;
-+ return 0;
- }
-
- /*------------------------------------------------------------------
- * These functions should EXACTLY match the inline version in
- * container.h. If you change one, change them both.
- */
-+int CONTAINER_INSERT(netsnmp_container* x, const void* k)
-+{
-+ /** start at first container */
-+ while(x->prev)
-+ x = x->prev;
-+ return CONTAINER_INSERT_HELPER(x, k);
-+}
-+
-+/*------------------------------------------------------------------
-+ * These functions should EXACTLY match the inline version in
-+ * container.h. If you change one, change them both.
-+ */
- int CONTAINER_REMOVE(netsnmp_container *x, const void *k)
- {
- int rc2, rc = 0;
-Index: net-snmp/include/net-snmp/library/container.h
-===================================================================
---- net-snmp/include/net-snmp/library/container.h (Revision 16803)
-+++ net-snmp/include/net-snmp/library/container.h (Revision 16804)
-@@ -351,32 +351,43 @@
- * container.c. If you change one, change them both.
- */
- NETSNMP_STATIC_INLINE /* gcc docs recommend static w/inline */
-- int CONTAINER_INSERT(netsnmp_container *x, const void *k)
-+ int CONTAINER_INSERT_HELPER(netsnmp_container* x, const void* k)
- {
-- int rc2, rc = 0;
--
-- /** start at first container */
-- while(x->prev)
-- x = x->prev;
-- for(; x; x = x->next) {
-- if ((NULL != x->insert_filter) &&
-- (x->insert_filter(x,k) == 1))
-- continue;
-- rc2 = x->insert(x,k);
-- if (rc2) {
-+ while(x && x->insert_filter && x->insert_filter(x,k) == 1)
-+ x = x->next;
-+ if(x) {
-+ int rc = x->insert(x,k);
-+ if(rc)
- /* snmp_log(LOG_ERR,"error on subcontainer '%s' insert (%d)\n",
-- x->container_name ? x->container_name : "", rc2); */
-- rc = rc2;
-+ x->container_name ? x->container_name : "", rc); */ ;
-+ else {
-+ rc = CONTAINER_INSERT_HELPER(x->next, k);
-+ if(rc)
-+ x->remove(x,k);
- }
-+ return rc;
- }
-- return rc;
-+ return 0;
- }
--
-+
- /*------------------------------------------------------------------
- * These functions should EXACTLY match the function version in
- * container.c. If you change one, change them both.
- */
- NETSNMP_STATIC_INLINE /* gcc docs recommend static w/inline */
-+ int CONTAINER_INSERT(netsnmp_container* x, const void* k)
-+ {
-+ /** start at first container */
-+ while(x->prev)
-+ x = x->prev;
-+ return CONTAINER_INSERT_HELPER(x, k);
-+ }
-+
-+ /*------------------------------------------------------------------
-+ * These functions should EXACTLY match the function version in
-+ * container.c. If you change one, change them both.
-+ */
-+ NETSNMP_STATIC_INLINE /* gcc docs recommend static w/inline */
- int CONTAINER_REMOVE(netsnmp_container *x, const void *k)
- {
- int rc2, rc = 0;
Deleted: branches/net-snmp54/debian/patches/48_cve2008_2292_perl.README
===================================================================
--- branches/net-snmp54/debian/patches/48_cve2008_2292_perl.README 2009-07-19 18:24:32 UTC (rev 268)
+++ branches/net-snmp54/debian/patches/48_cve2008_2292_perl.README 2009-07-31 19:26:32 UTC (rev 269)
@@ -1 +0,0 @@
-Upstream Changeset 16770: perl: BUG: 1826174: Check for buffer overflow when printing values.
Deleted: branches/net-snmp54/debian/patches/48_cve2008_2292_perl.patch
===================================================================
--- branches/net-snmp54/debian/patches/48_cve2008_2292_perl.patch 2009-07-19 18:24:32 UTC (rev 268)
+++ branches/net-snmp54/debian/patches/48_cve2008_2292_perl.patch 2009-07-31 19:26:32 UTC (rev 269)
@@ -1,103 +0,0 @@
-Index: perl/SNMP/SNMP.xs
-===================================================================
---- perl/SNMP/SNMP.xs (Revision 16769)
-+++ perl/SNMP/SNMP.xs (Revision 16770)
-@@ -470,14 +470,16 @@
- if (flag == USE_ENUMS) {
- for(ep = tp->enums; ep; ep = ep->next) {
- if (ep->value == *var->val.integer) {
-- strcpy(buf, ep->label);
-+ strncpy(buf, ep->label, buf_len);
-+ buf[buf_len-1] = '\0';
- len = strlen(buf);
- break;
- }
- }
- }
- if (!len) {
-- sprintf(buf,"%ld", *var->val.integer);
-+ snprintf(buf, buf_len, "%ld", *var->val.integer);
-+ buf[buf_len-1] = '\0';
- len = strlen(buf);
- }
- break;
-@@ -486,21 +488,25 @@
- case ASN_COUNTER:
- case ASN_TIMETICKS:
- case ASN_UINTEGER:
-- sprintf(buf,"%lu", (unsigned long) *var->val.integer);
-+ snprintf(buf, buf_len, "%lu", (unsigned long) *var->val.integer);
-+ buf[buf_len-1] = '\0';
- len = strlen(buf);
- break;
-
- case ASN_OCTET_STR:
- case ASN_OPAQUE:
-- memcpy(buf, (char*)var->val.string, var->val_len);
- len = var->val_len;
-+ if ( len > buf_len )
-+ len = buf_len;
-+ memcpy(buf, (char*)var->val.string, len);
- break;
-
- case ASN_IPADDRESS:
-- ip = (u_char*)var->val.string;
-- sprintf(buf, "%d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]);
-- len = strlen(buf);
-- break;
-+ ip = (u_char*)var->val.string;
-+ snprintf(buf, buf_len, "%d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]);
-+ buf[buf_len-1] = '\0';
-+ len = strlen(buf);
-+ break;
-
- case ASN_NULL:
- break;
-@@ -512,14 +518,14 @@
- break;
-
- case SNMP_ENDOFMIBVIEW:
-- sprintf(buf,"%s", "ENDOFMIBVIEW");
-- break;
-+ snprintf(buf, buf_len, "%s", "ENDOFMIBVIEW");
-+ break;
- case SNMP_NOSUCHOBJECT:
-- sprintf(buf,"%s", "NOSUCHOBJECT");
-- break;
-+ snprintf(buf, buf_len, "%s", "NOSUCHOBJECT");
-+ break;
- case SNMP_NOSUCHINSTANCE:
-- sprintf(buf,"%s", "NOSUCHINSTANCE");
-- break;
-+ snprintf(buf, buf_len, "%s", "NOSUCHINSTANCE");
-+ break;
-
- case ASN_COUNTER64:
- #ifdef NETSNMP_WITH_OPAQUE_SPECIAL_TYPES
-@@ -538,19 +544,19 @@
- #endif
-
- case ASN_BIT_STR:
-- snprint_bitstring(buf, sizeof(buf), var, NULL, NULL, NULL);
-+ snprint_bitstring(buf, buf_len, var, NULL, NULL, NULL);
- len = strlen(buf);
- break;
- #ifdef NETSNMP_WITH_OPAQUE_SPECIAL_TYPES
- case ASN_OPAQUE_FLOAT:
-- if (var->val.floatVal)
-- sprintf(buf,"%f", *var->val.floatVal);
-- break;
-+ if (var->val.floatVal)
-+ snprintf(buf, buf_len, "%f", *var->val.floatVal);
-+ break;
-
- case ASN_OPAQUE_DOUBLE:
-- if (var->val.doubleVal)
-- sprintf(buf,"%f", *var->val.doubleVal);
-- break;
-+ if (var->val.doubleVal)
-+ snprintf(buf, buf_len, "%f", *var->val.doubleVal);
-+ break;
- #endif
-
- case ASN_NSAP:
Deleted: branches/net-snmp54/debian/patches/49_cve2008_2292_python.README
===================================================================
--- branches/net-snmp54/debian/patches/49_cve2008_2292_python.README 2009-07-19 18:24:32 UTC (rev 268)
+++ branches/net-snmp54/debian/patches/49_cve2008_2292_python.README 2009-07-31 19:26:32 UTC (rev 269)
@@ -1 +0,0 @@
-Upstream Changeset 16962: python: BUG: 1826174: Check for buffer overflow when printing values.
Deleted: branches/net-snmp54/debian/patches/49_cve2008_2292_python.patch
===================================================================
--- branches/net-snmp54/debian/patches/49_cve2008_2292_python.patch 2009-07-19 18:24:32 UTC (rev 268)
+++ branches/net-snmp54/debian/patches/49_cve2008_2292_python.patch 2009-07-31 19:26:32 UTC (rev 269)
@@ -1,86 +0,0 @@
-Index: python/netsnmp/client_intf.c
-===================================================================
---- python/netsnmp/client_intf.c (Revision 16961)
-+++ python/netsnmp/client_intf.c (Revision 16962)
-@@ -330,14 +330,15 @@
- if (flag == USE_ENUMS) {
- for(ep = tp->enums; ep; ep = ep->next) {
- if (ep->value == *var->val.integer) {
-- strcpy(buf, ep->label);
-+ strncpy(buf, ep->label, buf_len);
-+ buf[buf_len -1] = 0;
- len = STRLEN(buf);
- break;
- }
- }
- }
- if (!len) {
-- sprintf(buf,"%ld", *var->val.integer);
-+ snprintf(buf,"%ld", buf_len, *var->val.integer);
- len = STRLEN(buf);
- }
- break;
-@@ -346,19 +347,21 @@
- case ASN_COUNTER:
- case ASN_TIMETICKS:
- case ASN_UINTEGER:
-- sprintf(buf,"%lu", (unsigned long) *var->val.integer);
-+ snprintf(buf, buf_len, "%lu", (unsigned long) *var->val.integer);
- len = STRLEN(buf);
- break;
-
- case ASN_OCTET_STR:
- case ASN_OPAQUE:
-- memcpy(buf, (char*)var->val.string, var->val_len);
- len = var->val_len;
-+ if (len > buf_len)
-+ len = buf_len;
-+ memcpy(buf, (char*)var->val.string, len);
- break;
-
- case ASN_IPADDRESS:
- ip = (u_char*)var->val.string;
-- sprintf(buf, "%d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]);
-+ snprintf(buf, buf_len, "%d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]);
- len = STRLEN(buf);
- break;
-
-@@ -372,13 +375,13 @@
- break;
-
- case SNMP_ENDOFMIBVIEW:
-- sprintf(buf,"%s", "ENDOFMIBVIEW");
-+ snprintf(buf, buf_len, "%s", "ENDOFMIBVIEW");
- break;
- case SNMP_NOSUCHOBJECT:
-- sprintf(buf,"%s", "NOSUCHOBJECT");
-+ snprintf(buf, buf_len, "%s", "NOSUCHOBJECT");
- break;
- case SNMP_NOSUCHINSTANCE:
-- sprintf(buf,"%s", "NOSUCHINSTANCE");
-+ snprintf(buf, buf_len, "%s", "NOSUCHINSTANCE");
- break;
-
- case ASN_COUNTER64:
-@@ -398,18 +401,18 @@
- #endif
-
- case ASN_BIT_STR:
-- snprint_bitstring(buf, sizeof(buf), var, NULL, NULL, NULL);
-+ snprint_bitstring(buf, buf_len, var, NULL, NULL, NULL);
- len = STRLEN(buf);
- break;
- #ifdef OPAQUE_SPECIAL_TYPES
- case ASN_OPAQUE_FLOAT:
- if (var->val.floatVal)
-- sprintf(buf,"%f", *var->val.floatVal);
-+ snprintf(buf, buf_len, "%f", *var->val.floatVal);
- break;
-
- case ASN_OPAQUE_DOUBLE:
- if (var->val.doubleVal)
-- sprintf(buf,"%f", *var->val.doubleVal);
-+ snprintf(buf, buf_len, "%f", *var->val.doubleVal);
- break;
- #endif
-
Deleted: branches/net-snmp54/debian/patches/50_cve2008_0960.README
===================================================================
--- branches/net-snmp54/debian/patches/50_cve2008_0960.README 2009-07-19 18:24:32 UTC (rev 268)
+++ branches/net-snmp54/debian/patches/50_cve2008_0960.README 2009-07-31 19:26:32 UTC (rev 269)
@@ -1 +0,0 @@
-Upstream Changeset 17023: BUG: 1989089: Check for HMAC length
Deleted: branches/net-snmp54/debian/patches/50_cve2008_0960.patch
===================================================================
--- branches/net-snmp54/debian/patches/50_cve2008_0960.patch 2009-07-19 18:24:32 UTC (rev 268)
+++ branches/net-snmp54/debian/patches/50_cve2008_0960.patch 2009-07-31 19:26:32 UTC (rev 269)
@@ -1,13 +0,0 @@
---- net-snmp-5.4.1/snmplib/scapi.c 2006-09-15 05:47:01.000000000 -0700
-+++ net-snmp-5.4.1.1/snmplib/scapi.c 2008-05-13 17:43:17.000000000 -0700
-@@ -563,6 +563,10 @@
- }
-
-
-+ if (maclen != USM_MD5_AND_SHA_AUTH_LEN) {
-+ QUITFUN(SNMPERR_GENERR, sc_check_keyed_hash_quit);
-+ }
-+
- /*
- * Generate a full hash of the message, then compare
- * the result with the given MAC which may shorter than
Deleted: branches/net-snmp54/debian/patches/51_allow_g_groupname.README
===================================================================
--- branches/net-snmp54/debian/patches/51_allow_g_groupname.README 2009-07-19 18:24:32 UTC (rev 268)
+++ branches/net-snmp54/debian/patches/51_allow_g_groupname.README 2009-07-31 19:26:32 UTC (rev 269)
@@ -1 +0,0 @@
-Upstream Changeset 17158: snmpd: PATCH: 2014204: Support -g {groupname}
Deleted: branches/net-snmp54/debian/patches/51_allow_g_groupname.patch
===================================================================
--- branches/net-snmp54/debian/patches/51_allow_g_groupname.patch 2009-07-19 18:24:32 UTC (rev 268)
+++ branches/net-snmp54/debian/patches/51_allow_g_groupname.patch 2009-07-31 19:26:32 UTC (rev 269)
@@ -1,32 +0,0 @@
-Index: agent/snmpd.c
-===================================================================
---- net-snmp-5.4.1.orig/agent/snmpd.c (Revision 17157)
-+++ net-snmp-5.4.1/agent/snmpd.c (Revision 17158)
-@@ -574,8 +574,26 @@
- #if HAVE_UNISTD_H
- case 'g':
- if (optarg != NULL) {
-+ char *ecp;
-+ int gid;
-+
-+ gid = strtoul(optarg, &ecp, 10);
-+ if (*ecp) {
-+#if HAVE_GETPWNAM && HAVE_PWD_H
-+ struct group *info;
-+ info = getgrnam(optarg);
-+ if (info) {
-+ gid = info->gr_gid;
-+ } else {
-+#endif
-+ fprintf(stderr, "Bad group id: %s\n", optarg);
-+ exit(1);
-+#if HAVE_GETPWNAM && HAVE_PWD_H
-+ }
-+#endif
-+ }
- netsnmp_ds_set_int(NETSNMP_DS_APPLICATION_ID,
-- NETSNMP_DS_AGENT_GROUPID, atoi(optarg));
-+ NETSNMP_DS_AGENT_GROUPID, gid);
- } else {
- usage(argv[0]);
- }
Deleted: branches/net-snmp54/debian/patches/52_suppress_registration_warnings.README
===================================================================
--- branches/net-snmp54/debian/patches/52_suppress_registration_warnings.README 2009-07-19 18:24:32 UTC (rev 268)
+++ branches/net-snmp54/debian/patches/52_suppress_registration_warnings.README 2009-07-31 19:26:32 UTC (rev 269)
@@ -1,3 +0,0 @@
-Upstream Changeset 16669: Official Patch 1805971
-agent: suppress annoying "registration != duplicate" warning for root oids
-(otherwise, you'll get this message on almost every startup)
Deleted: branches/net-snmp54/debian/patches/52_suppress_registration_warnings.patch
===================================================================
--- branches/net-snmp54/debian/patches/52_suppress_registration_warnings.patch 2009-07-19 18:24:32 UTC (rev 268)
+++ branches/net-snmp54/debian/patches/52_suppress_registration_warnings.patch 2009-07-31 19:26:32 UTC (rev 269)
@@ -1,14 +0,0 @@
-Index: agent/agent_registry.c
-===================================================================
---- net-snmp-5.4.1.orig/agent/agent_registry.c (Revision 16668)
-+++ net-snmp-5.4.1/agent/agent_registry.c (Revision 16669)
-@@ -532,7 +532,8 @@
-
- if (next && (next->namelen == new_sub->namelen) &&
- (next->priority == new_sub->priority)) {
-- netsnmp_assert(!"registration != duplicate"); /* always false */
-+ if (new_sub->namelen != 1) /* ignore root OID dups */
-+ netsnmp_assert(!"registration != duplicate"); /* always false */
- return MIB_DUPLICATE_REGISTRATION;
- }
-
Deleted: branches/net-snmp54/debian/patches/53_fix_python_regression.README
===================================================================
--- branches/net-snmp54/debian/patches/53_fix_python_regression.README 2009-07-19 18:24:32 UTC (rev 268)
+++ branches/net-snmp54/debian/patches/53_fix_python_regression.README 2009-07-31 19:26:32 UTC (rev 269)
@@ -1,2 +0,0 @@
-Upstream Changeset 17207: Fix 1868278
-python: BUG: 1868278: Python segfault (introduced by r16962)
Deleted: branches/net-snmp54/debian/patches/53_fix_python_regression.patch
===================================================================
--- branches/net-snmp54/debian/patches/53_fix_python_regression.patch 2009-07-19 18:24:32 UTC (rev 268)
+++ branches/net-snmp54/debian/patches/53_fix_python_regression.patch 2009-07-31 19:26:32 UTC (rev 269)
@@ -1,13 +0,0 @@
-Index: python/netsnmp/client_intf.c
-===================================================================
---- net-snmp-5.4.1.orig/python/netsnmp/client_intf.c (Revision 17206)
-+++ net-snmp-5.4.1/python/netsnmp/client_intf.c (Revision 17207)
-@@ -338,7 +338,7 @@
- }
- }
- if (!len) {
-- snprintf(buf,"%ld", buf_len, *var->val.integer);
-+ snprintf(buf, buf_len, "%ld", *var->val.integer);
- len = STRLEN(buf);
- }
- break;
Deleted: branches/net-snmp54/debian/patches/54_fix_xen.README
===================================================================
--- branches/net-snmp54/debian/patches/54_fix_xen.README 2009-07-19 18:24:32 UTC (rev 268)
+++ branches/net-snmp54/debian/patches/54_fix_xen.README 2009-07-31 19:26:32 UTC (rev 269)
@@ -1,2 +0,0 @@
-Upstream Changeset 16790: PATCH 1849903:
-snmpd: from jsafranek: do not spam log with asserts when XEN is used
Deleted: branches/net-snmp54/debian/patches/54_fix_xen.patch
===================================================================
--- branches/net-snmp54/debian/patches/54_fix_xen.patch 2009-07-19 18:24:32 UTC (rev 268)
+++ branches/net-snmp54/debian/patches/54_fix_xen.patch 2009-07-31 19:26:32 UTC (rev 269)
@@ -1,22 +0,0 @@
-Index: agent/mibgroup/if-mib/ifTable/ifTable_data_access.c
-===================================================================
---- net-snmp-5.4.1.orig/agent/mibgroup/if-mib/ifTable/ifTable_data_access.c (Revision 16789)
-+++ net-snmp-5.4.1/agent/mibgroup/if-mib/ifTable/ifTable_data_access.c (Revision 16790)
-@@ -208,7 +208,16 @@
- {
- int rc = strcmp(rowreq_ctx->data.ifName,
- ifentry->name);
-- netsnmp_assert(rc == 0);
-+ if (rc != 0) {
-+ static int logged = 0;
-+ if (!logged) {
-+ snmp_log(LOG_ERR, "Name of an interface changed. Such " \
-+ "interfaces will keep its old name in IF-MIB.\n");
-+ logged = 1;
-+ }
-+ DEBUGMSGTL(("ifTable:access", "interface %s changed name to %s, ignoring\n",
-+ rowreq_ctx->data.ifName, ifentry->name));
-+ }
- }
- #endif
- /*
Deleted: branches/net-snmp54/debian/patches/55_cve2008_4309.README
===================================================================
--- branches/net-snmp54/debian/patches/55_cve2008_4309.README 2009-07-19 18:24:32 UTC (rev 268)
+++ branches/net-snmp54/debian/patches/55_cve2008_4309.README 2009-07-31 19:26:32 UTC (rev 269)
@@ -1,2 +0,0 @@
-Upstream changeset 17292: Fix for CVE-2008-4309.
-NEWS: snmpd: Applying patch from Magnus Fromreide to fix the getbulk issue reported by Oscar Mira-Sanchez
Deleted: branches/net-snmp54/debian/patches/55_cve2008_4309.patch
===================================================================
--- branches/net-snmp54/debian/patches/55_cve2008_4309.patch 2009-07-19 18:24:32 UTC (rev 268)
+++ branches/net-snmp54/debian/patches/55_cve2008_4309.patch 2009-07-31 19:26:32 UTC (rev 269)
@@ -1,60 +0,0 @@
-Index: agent/snmp_agent.c
-===================================================================
---- net-snmp-5.4.1.orig/agent/snmp_agent.c (Revision 17291)
-+++ net-snmp-5.4.1/agent/snmp_agent.c (Revision 17292)
-@@ -2174,7 +2174,6 @@
- r = 0;
- asp->bulkcache = NULL;
- } else {
-- int numresponses;
- int maxbulk =
- netsnmp_ds_get_int(NETSNMP_DS_APPLICATION_ID,
- NETSNMP_DS_AGENT_MAX_GETBULKREPEATS);
-@@ -2185,28 +2184,31 @@
- if (maxresponses == 0)
- maxresponses = 100; /* more than reasonable default */
-
-- if (maxbulk == 0)
-- maxbulk = -1;
-+ /* ensure that the total number of responses fits in a mallocable
-+ * result vector
-+ */
-+ if (maxresponses < 0 ||
-+ maxresponses > INT_MAX / sizeof(struct varbind_list *))
-+ maxresponses = INT_MAX / sizeof(struct varbind_list *);
-
-+ /* ensure that the maximum number of repetitions will fit in the
-+ * result vector
-+ */
-+ if (maxbulk <= 0 || maxbulk > maxresponses / r)
-+ maxbulk = maxresponses / r;
-+
- /* limit getbulk number of repeats to a configured size */
-- if (asp->pdu->errindex > maxbulk && maxbulk != -1) {
-+ if (asp->pdu->errindex > maxbulk) {
- asp->pdu->errindex = maxbulk;
-+ DEBUGMSGTL(("snmp_agent",
-+ "truncating number of getbulk repeats to %d\n",
-+ asp->pdu->errindex));
- }
-
-- numresponses = asp->pdu->errindex * r;
-+ asp->bulkcache =
-+ (netsnmp_variable_list **) malloc(
-+ asp->pdu->errindex * r * sizeof(struct varbind_list *));
-
-- /* limit getbulk number of getbulk responses to a configured size */
-- if (maxresponses != -1 && numresponses > maxresponses) {
-- /* attempt to truncate this */
-- asp->pdu->errindex = maxresponses/r;
-- numresponses = asp->pdu->errindex * r;
-- DEBUGMSGTL(("snmp_agent", "truncating number of getbulk repeats to %d\n", asp->pdu->errindex));
-- }
--
-- asp->bulkcache =
-- (netsnmp_variable_list **) malloc(numresponses *
-- sizeof(struct
-- varbind_list *));
- if (!asp->bulkcache) {
- DEBUGMSGTL(("snmp_agent", "Bulkcache malloc failed\n"));
- return SNMP_ERR_GENERR;
Modified: branches/net-snmp54-dev/debian/patches/25_duplicate_iftable.patch
===================================================================
--- branches/net-snmp54-dev/debian/patches/25_duplicate_iftable.patch 2009-07-19 18:24:32 UTC (rev 268)
+++ branches/net-snmp54-dev/debian/patches/25_duplicate_iftable.patch 2009-07-31 19:26:32 UTC (rev 269)
@@ -1,7 +1,54 @@
-Index: snmplib/snmp_enum.c
-===================================================================
---- snmplib/snmp_enum.c (Revision 16802)
-+++ snmplib/snmp_enum.c (Arbeitskopie)
+diff -ru net-snmp-5.4.2.1.orig/agent/mibgroup/if-mib/data_access/interface.c net-snmp-5.4.2.1/agent/mibgroup/if-mib/data_access/interface.c
+--- net-snmp-5.4.2.1.orig/agent/mibgroup/if-mib/data_access/interface.c 2008-02-23 00:52:33.000000000 +0100
++++ net-snmp-5.4.2.1/agent/mibgroup/if-mib/data_access/interface.c 2009-07-31 17:10:49.000000000 +0200
+@@ -469,12 +469,12 @@
+ if (index != tmp) {
+ static int logged = 0;
+ if (!logged) {
+- snmp_log(LOG_ERR, "IfIndex of an interface changed. Such " \
+- "interfaces will appear multiple times in IF-MIB.\n");
++ snmp_log(LOG_ERR, "IfIndex of an interface changed.\n");
+ logged = 1;
+ }
+- DEBUGMSGTL(("access:interface:ifIndex", "index %d != tmp for %s\n",
+- index, name));
++ se_remove_value_from_slist("interfaces", name);
++ se_add_pair_to_slist("interfaces", strdup(name), index);
++ DEBUGMSGTL(("access:interface:ifIndex", "ifname %s, old index %d, already existing, replaced with %d\n", name, tmp, index));
+ }
+ }
+
+diff -ru net-snmp-5.4.2.1.orig/agent/mibgroup/if-mib/ifTable/ifTable_data_access.c net-snmp-5.4.2.1/agent/mibgroup/if-mib/ifTable/ifTable_data_access.c
+--- net-snmp-5.4.2.1.orig/agent/mibgroup/if-mib/ifTable/ifTable_data_access.c 2008-02-12 20:05:24.000000000 +0100
++++ net-snmp-5.4.2.1/agent/mibgroup/if-mib/ifTable/ifTable_data_access.c 2009-07-31 17:04:17.000000000 +0200
+@@ -266,8 +266,21 @@
+ _add_new_interface(netsnmp_interface_entry *ifentry,
+ netsnmp_container *container)
+ {
+- ifTable_rowreq_ctx *rowreq_ctx;
+-
++ ifTable_rowreq_ctx *rowreq_ctx, *container_entry;
++ netsnmp_iterator *ctxit;
++ ctxit = CONTAINER_ITERATOR(container);
++ container_entry = ITERATOR_FIRST(ctxit);
++
++ for(; container_entry; container_entry = ITERATOR_NEXT(ctxit)) {
++ if(!strcmp(ifentry->name, container_entry->data.ifName) && \
++ ifentry->index != container_entry->data.ifentry->index) {
++ DEBUGMSGTL(("ifTable:access", "removing old entry %s (index %d != %d)\n",
++ container_entry->data.ifName, container_entry->data.ifentry->index, ifentry->index));
++ se_remove_value_from_slist("interfaces", container_entry->data.ifName);
++ CONTAINER_REMOVE(container, container_entry);
++ ifTable_release_rowreq_ctx(container_entry);
++ }
++ }
+ DEBUGMSGTL(("ifTable:access", "creating new entry\n"));
+
+ /*
+Nur in net-snmp-5.4.2.1/agent/mibgroup/if-mib/ifTable: ifTable_data_access.c.orig.
+diff -ru net-snmp-5.4.2.1.orig/snmplib/snmp_enum.c net-snmp-5.4.2.1/snmplib/snmp_enum.c
+--- net-snmp-5.4.2.1.orig/snmplib/snmp_enum.c 2005-02-09 20:46:35.000000000 +0100
++++ net-snmp-5.4.2.1/snmplib/snmp_enum.c 2009-07-31 17:04:17.000000000 +0200
@@ -213,6 +213,27 @@
return SE_DNE; /* XXX: um, no good solution here */
}
@@ -50,52 +97,3 @@
int
se_find_free_value_in_slist(const char *listname)
{
-Index: agent/mibgroup/if-mib/ifTable/ifTable_data_access.c
-===================================================================
---- agent/mibgroup/if-mib/ifTable/ifTable_data_access.c (Revision 16802)
-+++ agent/mibgroup/if-mib/ifTable/ifTable_data_access.c (Arbeitskopie)
-@@ -266,8 +266,21 @@
- _add_new_interface(netsnmp_interface_entry *ifentry,
- netsnmp_container *container)
- {
-- ifTable_rowreq_ctx *rowreq_ctx;
-+ ifTable_rowreq_ctx *rowreq_ctx, *container_entry;
-+ netsnmp_iterator *ctxit;
-+ ctxit = CONTAINER_ITERATOR(container);
-+ container_entry = ITERATOR_FIRST(ctxit);
-
-+ for(; container_entry; container_entry = ITERATOR_NEXT(ctxit)) {
-+ if(!strcmp(ifentry->name, container_entry->data.ifName) && \
-+ ifentry->index != container_entry->data.ifentry->index) {
-+ DEBUGMSGTL(("ifTable:access", "removing old entry %s (index %d != %d)\n",
-+ container_entry->data.ifName, container_entry->data.ifentry->index, ifentry->index));
-+ se_remove_value_from_slist("interfaces", container_entry->data.ifName);
-+ CONTAINER_REMOVE(container, container_entry);
-+ ifTable_release_rowreq_ctx(container_entry);
-+ }
-+ }
- DEBUGMSGTL(("ifTable:access", "creating new entry\n"));
-
- /*
-Index: agent/mibgroup/if-mib/data_access/interface.c
-===================================================================
---- agent/mibgroup/if-mib/data_access/interface.c (Revision 16802)
-+++ agent/mibgroup/if-mib/data_access/interface.c (Arbeitskopie)
-@@ -467,14 +467,9 @@
- }
- else
- if (index != tmp) {
-- static int logged = 0;
-- if (!logged) {
-- snmp_log(LOG_ERR, "IfIndex of an interface changed. Such " \
-- "interfaces will appear multiple times in IF-MIB.\n");
-- logged = 1;
-- }
-- DEBUGMSGTL(("access:interface:ifIndex", "index %d != tmp for %s\n",
-- index, name));
-+ se_remove_value_from_slist("interfaces", name);
-+ se_add_pair_to_slist("interfaces", strdup(name), index);
-+ DEBUGMSGTL(("access:interface:ifIndex", "ifname %s, old index %d, already existing, replaced with %d\n", name, tmp, index));
- }
- }
-
Modified: branches/net-snmp54-dev/debian/patches/31_silence_subcontainer.README
===================================================================
--- branches/net-snmp54-dev/debian/patches/31_silence_subcontainer.README 2009-07-19 18:24:32 UTC (rev 268)
+++ branches/net-snmp54-dev/debian/patches/31_silence_subcontainer.README 2009-07-31 19:26:32 UTC (rev 269)
@@ -1 +1,3 @@
-Stop syslog spam about subcontainer insert error.
+Upstream Change 17254:
+
+CHANGES: snmpd: BUG: 1693039: be silent when insert fails.
Modified: branches/net-snmp54-dev/debian/patches/31_silence_subcontainer.patch
===================================================================
--- branches/net-snmp54-dev/debian/patches/31_silence_subcontainer.patch 2009-07-19 18:24:32 UTC (rev 268)
+++ branches/net-snmp54-dev/debian/patches/31_silence_subcontainer.patch 2009-07-31 19:26:32 UTC (rev 269)
@@ -1,15 +1,26 @@
+Index: snmplib/container.c
+===================================================================
+--- net-snmp-5.4.2.1.orig/snmplib/container.c (Revision 17253)
++++ net-snmp-5.4.2.1/snmplib/container.c (Revision 17254)
+@@ -275,7 +275,7 @@
+ if(x) {
+ int rc = x->insert(x,k);
+ if(rc)
+- snmp_log(LOG_ERR,"error on subcontainer '%s' insert (%d)\n",
++ snmp_log(LOG_DEBUG,"error on subcontainer '%s' insert (%d)\n",
+ x->container_name ? x->container_name : "", rc);
+ else {
+ rc = CONTAINER_INSERT_HELPER(x->next, k);
Index: include/net-snmp/library/container.h
===================================================================
---- include/net-snmp/library/container.h (Revision 16805)
-+++ include/net-snmp/library/container.h (Arbeitskopie)
-@@ -358,8 +358,8 @@
+--- net-snmp-5.4.2.1.orig/include/net-snmp/library/container.h (Revision 17253)
++++ net-snmp-5.4.2.1/include/net-snmp/library/container.h (Revision 17254)
+@@ -358,7 +358,7 @@
if(x) {
int rc = x->insert(x,k);
if(rc)
- snmp_log(LOG_ERR,"error on subcontainer '%s' insert (%d)\n",
-- x->container_name ? x->container_name : "", rc);
-+ /*snmp_log(LOG_ERR,"error on subcontainer '%s' insert (%d)\n",
-+ x->container_name ? x->container_name : "", rc)*/;
++ snmp_log(LOG_DEBUG,"error on subcontainer '%s' insert (%d)\n",
+ x->container_name ? x->container_name : "", rc);
else {
rc = CONTAINER_INSERT_HELPER(x->next, k);
- if(rc)
Modified: trunk/debian/patches/25_duplicate_iftable.patch
===================================================================
--- trunk/debian/patches/25_duplicate_iftable.patch 2009-07-19 18:24:32 UTC (rev 268)
+++ trunk/debian/patches/25_duplicate_iftable.patch 2009-07-31 19:26:32 UTC (rev 269)
@@ -1,7 +1,54 @@
-Index: snmplib/snmp_enum.c
-===================================================================
---- snmplib/snmp_enum.c (Revision 16802)
-+++ snmplib/snmp_enum.c (Arbeitskopie)
+diff -ru net-snmp-5.4.2.1.orig/agent/mibgroup/if-mib/data_access/interface.c net-snmp-5.4.2.1/agent/mibgroup/if-mib/data_access/interface.c
+--- net-snmp-5.4.2.1.orig/agent/mibgroup/if-mib/data_access/interface.c 2008-02-23 00:52:33.000000000 +0100
++++ net-snmp-5.4.2.1/agent/mibgroup/if-mib/data_access/interface.c 2009-07-31 17:10:49.000000000 +0200
+@@ -469,12 +469,12 @@
+ if (index != tmp) {
+ static int logged = 0;
+ if (!logged) {
+- snmp_log(LOG_ERR, "IfIndex of an interface changed. Such " \
+- "interfaces will appear multiple times in IF-MIB.\n");
++ snmp_log(LOG_ERR, "IfIndex of an interface changed.\n");
+ logged = 1;
+ }
+- DEBUGMSGTL(("access:interface:ifIndex", "index %d != tmp for %s\n",
+- index, name));
++ se_remove_value_from_slist("interfaces", name);
++ se_add_pair_to_slist("interfaces", strdup(name), index);
++ DEBUGMSGTL(("access:interface:ifIndex", "ifname %s, old index %d, already existing, replaced with %d\n", name, tmp, index));
+ }
+ }
+
+diff -ru net-snmp-5.4.2.1.orig/agent/mibgroup/if-mib/ifTable/ifTable_data_access.c net-snmp-5.4.2.1/agent/mibgroup/if-mib/ifTable/ifTable_data_access.c
+--- net-snmp-5.4.2.1.orig/agent/mibgroup/if-mib/ifTable/ifTable_data_access.c 2008-02-12 20:05:24.000000000 +0100
++++ net-snmp-5.4.2.1/agent/mibgroup/if-mib/ifTable/ifTable_data_access.c 2009-07-31 17:04:17.000000000 +0200
+@@ -266,8 +266,21 @@
+ _add_new_interface(netsnmp_interface_entry *ifentry,
+ netsnmp_container *container)
+ {
+- ifTable_rowreq_ctx *rowreq_ctx;
+-
++ ifTable_rowreq_ctx *rowreq_ctx, *container_entry;
++ netsnmp_iterator *ctxit;
++ ctxit = CONTAINER_ITERATOR(container);
++ container_entry = ITERATOR_FIRST(ctxit);
++
++ for(; container_entry; container_entry = ITERATOR_NEXT(ctxit)) {
++ if(!strcmp(ifentry->name, container_entry->data.ifName) && \
++ ifentry->index != container_entry->data.ifentry->index) {
++ DEBUGMSGTL(("ifTable:access", "removing old entry %s (index %d != %d)\n",
++ container_entry->data.ifName, container_entry->data.ifentry->index, ifentry->index));
++ se_remove_value_from_slist("interfaces", container_entry->data.ifName);
++ CONTAINER_REMOVE(container, container_entry);
++ ifTable_release_rowreq_ctx(container_entry);
++ }
++ }
+ DEBUGMSGTL(("ifTable:access", "creating new entry\n"));
+
+ /*
+Nur in net-snmp-5.4.2.1/agent/mibgroup/if-mib/ifTable: ifTable_data_access.c.orig.
+diff -ru net-snmp-5.4.2.1.orig/snmplib/snmp_enum.c net-snmp-5.4.2.1/snmplib/snmp_enum.c
+--- net-snmp-5.4.2.1.orig/snmplib/snmp_enum.c 2005-02-09 20:46:35.000000000 +0100
++++ net-snmp-5.4.2.1/snmplib/snmp_enum.c 2009-07-31 17:04:17.000000000 +0200
@@ -213,6 +213,27 @@
return SE_DNE; /* XXX: um, no good solution here */
}
@@ -50,52 +97,3 @@
int
se_find_free_value_in_slist(const char *listname)
{
-Index: agent/mibgroup/if-mib/ifTable/ifTable_data_access.c
-===================================================================
---- agent/mibgroup/if-mib/ifTable/ifTable_data_access.c (Revision 16802)
-+++ agent/mibgroup/if-mib/ifTable/ifTable_data_access.c (Arbeitskopie)
-@@ -266,8 +266,21 @@
- _add_new_interface(netsnmp_interface_entry *ifentry,
- netsnmp_container *container)
- {
-- ifTable_rowreq_ctx *rowreq_ctx;
-+ ifTable_rowreq_ctx *rowreq_ctx, *container_entry;
-+ netsnmp_iterator *ctxit;
-+ ctxit = CONTAINER_ITERATOR(container);
-+ container_entry = ITERATOR_FIRST(ctxit);
-
-+ for(; container_entry; container_entry = ITERATOR_NEXT(ctxit)) {
-+ if(!strcmp(ifentry->name, container_entry->data.ifName) && \
-+ ifentry->index != container_entry->data.ifentry->index) {
-+ DEBUGMSGTL(("ifTable:access", "removing old entry %s (index %d != %d)\n",
-+ container_entry->data.ifName, container_entry->data.ifentry->index, ifentry->index));
-+ se_remove_value_from_slist("interfaces", container_entry->data.ifName);
-+ CONTAINER_REMOVE(container, container_entry);
-+ ifTable_release_rowreq_ctx(container_entry);
-+ }
-+ }
- DEBUGMSGTL(("ifTable:access", "creating new entry\n"));
-
- /*
-Index: agent/mibgroup/if-mib/data_access/interface.c
-===================================================================
---- agent/mibgroup/if-mib/data_access/interface.c (Revision 16802)
-+++ agent/mibgroup/if-mib/data_access/interface.c (Arbeitskopie)
-@@ -467,14 +467,9 @@
- }
- else
- if (index != tmp) {
-- static int logged = 0;
-- if (!logged) {
-- snmp_log(LOG_ERR, "IfIndex of an interface changed. Such " \
-- "interfaces will appear multiple times in IF-MIB.\n");
-- logged = 1;
-- }
-- DEBUGMSGTL(("access:interface:ifIndex", "index %d != tmp for %s\n",
-- index, name));
-+ se_remove_value_from_slist("interfaces", name);
-+ se_add_pair_to_slist("interfaces", strdup(name), index);
-+ DEBUGMSGTL(("access:interface:ifIndex", "ifname %s, old index %d, already existing, replaced with %d\n", name, tmp, index));
- }
- }
-
More information about the Pkg-net-snmp-commits
mailing list