From 466d5685138f90d61991fc2f457cb84d054686fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C5=A0afr=C3=A1nek?= Date: Wed, 2 Dec 2009 09:33:22 +0000 Subject: [PATCH] fix udpTable indexes on big-endian systems Resolves: #543352 --- net-snmp-5.5-udptable-index.patch | 27 +++++++++++++++++++++++++++ net-snmp.spec | 7 ++++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 net-snmp-5.5-udptable-index.patch diff --git a/net-snmp-5.5-udptable-index.patch b/net-snmp-5.5-udptable-index.patch new file mode 100644 index 0000000..a827b3d --- /dev/null +++ b/net-snmp-5.5-udptable-index.patch @@ -0,0 +1,27 @@ +543352: 'make test' fails on big endian system + +Source: upstream, SVN rev. 17860 + +Fix udpTable indexes. +Index: net-snmp/agent/mibgroup/mibII/udpTable.c +=================================================================== +--- net-snmp/agent/mibgroup/mibII/udpTable.c (revision 17859) ++++ net-snmp/agent/mibgroup/mibII/udpTable.c (revision 17860) +@@ -361,7 +361,7 @@ + { + UDPTABLE_ENTRY_TYPE *entry = (UDPTABLE_ENTRY_TYPE *)*loop_context; + long port; +- in_addr_t addr; ++ long addr; + + if (!entry) + return NULL; +@@ -376,7 +376,7 @@ + #else + addr = UDP_ADDRESS_TO_NETWORK_ORDER((in_addr_t)entry->UDPTABLE_LOCALADDRESS); + snmp_set_var_value(index, (u_char *)&addr, +- sizeof(entry->UDPTABLE_LOCALADDRESS)); ++ sizeof(addr)); + #endif + port = UDP_PORT_TO_HOST_ORDER(entry->UDPTABLE_LOCALPORT); + snmp_set_var_value(index->next_variable, diff --git a/net-snmp.spec b/net-snmp.spec index 28090b5..c5ad76b 100644 --- a/net-snmp.spec +++ b/net-snmp.spec @@ -10,7 +10,7 @@ Summary: A collection of SNMP protocol tools and libraries Name: net-snmp Version: 5.5 -Release: 3%{?dist} +Release: 4%{?dist} Epoch: 1 License: BSD and MIT @@ -29,6 +29,7 @@ Patch1: net-snmp-5.4.1-pie.patch Patch2: net-snmp-5.5-dir-fix.patch Patch3: net-snmp-5.5-multilib.patch Patch4: net-snmp-5.5-sensors3.patch +Patch5: net-snmp-5.5-udptable-index.patch Requires(post): chkconfig Requires(preun): chkconfig @@ -158,6 +159,7 @@ Net-SNMP toolkit library. %patch2 -p1 -b .dir-fix %patch3 -p1 -b .multilib %patch4 -p1 -b .sensors +%patch5 -p1 -b .udptable-index %build MIBS="host agentx smux \ @@ -399,6 +401,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_datadir}/snmp/mibs/* %changelog +* Wed Dec 2 2009 Jan Safranek 1:5.5-4 +- fix udpTable indexes on big-endian systems (#543352) + * Wed Nov 25 2009 Jan Safranek 1:5.5-3 - prepare the .spec file for review - run automatic regression suite after the compilation of the package