net-snmp/net-snmp-5.5-udptable-index.patch

28 lines
932 B
Diff

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,