rpms/net-snmp/devel net-snmp-5.3.1-shared-ip.patch, NONE, 1.1 net-snmp.spec, 1.115, 1.116
Jan Šafránek (jsafrane)
fedora-extras-commits at redhat.com
Thu Jun 28 08:58:59 UTC 2007
- Previous message: rpms/net-snmp/devel net-snmp-5.4-exec-crash.patch,NONE,1.1
- Next message: rpms/net-snmp/F-7 net-snmp-5.3.1-mib-option.patch, NONE, 1.1 net-snmp-5.3.1-shared-ip.patch, NONE, 1.1 net-snmp-5.4-exec-crash.patch, NONE, 1.1 net-snmp-5.4-hostname.patch, NONE, 1.1 net-snmp-5.4-udp-endpoint.patch, NONE, 1.1 net-snmp.redhat.conf, 1.1, 1.2 net-snmp.spec, 1.112, 1.113
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jsafrane
Update of /cvs/pkgs/rpms/net-snmp/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24035
Modified Files:
net-snmp.spec
Added Files:
net-snmp-5.3.1-shared-ip.patch
Log Message:
Fixing accidentally commited wrong BuildRequires and missing patch
net-snmp-5.3.1-shared-ip.patch:
--- NEW FILE net-snmp-5.3.1-shared-ip.patch ---
--- net-snmp-5.3.1/include/net-snmp/library/container.h.orig 2005-12-04 19:43:04.000000000 +0100
+++ net-snmp-5.3.1/include/net-snmp/library/container.h 2007-05-04 10:01:38.000000000 +0200
@@ -370,8 +370,32 @@
}
}
return rc;
- }
+ }
+
+ int CONTAINER_TRY_INSERT(netsnmp_container *x, const void *k)
+ {
+ const void *res = NULL;
+
+ netsnmp_container *start;
+ /** start at first container */
+ while(x->prev)
+ x = x->prev;
+
+ start = x;
+
+ for(; x; x = x->next) {
+ if ((NULL != x->insert_filter) &&
+ (x->insert_filter(x,k) == 1))
+ continue;
+ res = x->find(x,k);
+ if (res) {
+ return -1;
+ }
+ }
+ return CONTAINER_INSERT(start, k);
+ }
+
/*------------------------------------------------------------------
* These functions should EXACTLY match the function version in
* container.c. If you change one, change them both.
--- net-snmp-5.3.1/snmplib/container.c.orig 2006-04-21 02:24:47.000000000 +0200
+++ net-snmp-5.3.1/snmplib/container.c 2007-05-04 10:34:23.000000000 +0200
@@ -286,6 +286,29 @@
return rc;
}
+int CONTAINER_TRY_INSERT(netsnmp_container *x, const void *k)
+{
+ const void *res = NULL;
+
+ netsnmp_container *start;
+ /** start at first container */
+ while(x->prev)
+ x = x->prev;
+
+ start = x;
+
+ for(; x; x = x->next) {
+ if ((NULL != x->insert_filter) &&
+ (x->insert_filter(x,k) == 1))
+ continue;
+ res = x->find(x,k);
+ if (res) {
+ return -1;
+ }
+ }
+ return CONTAINER_INSERT(start, k);
+}
+
/*------------------------------------------------------------------
* These functions should EXACTLY match the inline version in
* container.h. If you change one, change them both.
--- net-snmp-5.4/agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.c.orig 2005-10-31 05:32:17.000000000 +0100
+++ net-snmp-5.4/agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.c 2007-05-04 12:03:17.000000000 +0200
@@ -272,7 +272,15 @@
/*
* add entry to container
*/
- CONTAINER_INSERT(container, entry);
+ rc = CONTAINER_TRY_INSERT(container, entry);
+ if (rc < 0) {
+ static int logged = 0;
+ if (!logged) {
+ snmp_log(LOG_NOTICE, "Duplicate IP address detected, some interfaces may not be visible in IP-MIB\n");
+ logged = 1;
+ }
+ netsnmp_access_ipaddress_entry_free(entry);
+ }
}
/*
--- net-snmp-5.4/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c.orig 2006-09-15 02:48:40.000000000 +0200
+++ net-snmp-5.4/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c 2007-05-04 12:03:44.000000000 +0200
@@ -324,7 +324,16 @@
/*
* add entry to container
*/
- CONTAINER_INSERT(container, entry);
+ rc = CONTAINER_TRY_INSERT(container, entry);
+ if (rc < 0) {
+ static int logged = 0;
+ if (!logged) {
+ snmp_log(LOG_NOTICE, "Duplicate IP address detected, some interfaces may not be visible in IP-MIB\n");
+ logged = 1;
+ }
+ netsnmp_access_ipaddress_entry_free(entry);
+ }
+
}
fclose(in);
Index: net-snmp.spec
===================================================================
RCS file: /cvs/pkgs/rpms/net-snmp/devel/net-snmp.spec,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -r1.115 -r1.116
--- net-snmp.spec 28 Jun 2007 08:55:26 -0000 1.115
+++ net-snmp.spec 28 Jun 2007 08:58:23 -0000 1.116
@@ -53,12 +53,12 @@
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: openssl-devel, bzip2-devel, beecrypt-devel, elfutils-devel
BuildRequires: libselinux-devel, elfutils-libelf-devel
-#BuildRequires: perl-devel
+BuildRequires: perl-devel
%ifarch %{ix86} x86_64
BuildRequires: lm_sensors-devel
%endif
%if %{tcp_wrappers}
-#BuildRequires: tcp_wrappers-devel
+BuildRequires: tcp_wrappers-devel
%endif
BuildRequires: perl, coreutils, grep, sed, findutils
@@ -379,6 +379,8 @@
- default snmptrapd.conf added (#243536)
- fix crash when multiple exec statements have the same name
(#243536)
+- fix ugly error message when more interfaces share
+ one IP address (#209861)
* Mon Mar 12 2007 Radek Vokál <rvokal at redhat.com> - 1:5.4-13
- fix overly verbose log message (#221911)
- Previous message: rpms/net-snmp/devel net-snmp-5.4-exec-crash.patch,NONE,1.1
- Next message: rpms/net-snmp/F-7 net-snmp-5.3.1-mib-option.patch, NONE, 1.1 net-snmp-5.3.1-shared-ip.patch, NONE, 1.1 net-snmp-5.4-exec-crash.patch, NONE, 1.1 net-snmp-5.4-hostname.patch, NONE, 1.1 net-snmp-5.4-udp-endpoint.patch, NONE, 1.1 net-snmp.redhat.conf, 1.1, 1.2 net-snmp.spec, 1.112, 1.113
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list