Fixing accidentally commited wrong BuildRequires and missing patch
This commit is contained in:
parent
c2a658425f
commit
2efab53aea
107
net-snmp-5.3.1-shared-ip.patch
Normal file
107
net-snmp-5.3.1-shared-ip.patch
Normal file
@ -0,0 +1,107 @@
|
||||
--- 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);
|
@ -53,12 +53,12 @@ Requires(preun): /bin/rm
|
||||
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 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
- 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@redhat.com> - 1:5.4-13
|
||||
- fix overly verbose log message (#221911)
|
||||
|
Loading…
Reference in New Issue
Block a user