mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-16 07:58:04 +00:00
Fix counter breakage on 64bit arch.
Reported by: sem Obtained from: http://sourceforge.net/tracker/index.php?func=detail&aid=2435793&group_id=12694&atid=312694
This commit is contained in:
parent
5e93e0b9e0
commit
74f1019c31
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=228770
@ -7,7 +7,7 @@
|
||||
|
||||
PORTNAME= snmp
|
||||
PORTVERSION= 5.4.2.1
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= net-mgmt ipv6
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
||||
MASTER_SITE_SUBDIR= net-snmp
|
||||
|
41
net-mgmt/net-snmp-devel/files/patch-interface_sysctl.c
Normal file
41
net-mgmt/net-snmp-devel/files/patch-interface_sysctl.c
Normal file
@ -0,0 +1,41 @@
|
||||
Index: agent/mibgroup/if-mib/data_access/interface_sysctl.c
|
||||
===================================================================
|
||||
--- agent/mibgroup/if-mib/data_access/interface_sysctl.c (revision 17324)
|
||||
+++ agent/mibgroup/if-mib/data_access/interface_sysctl.c (working copy)
|
||||
@@ -451,22 +451,22 @@
|
||||
NETSNMP_INTERFACE_FLAGS_HAS_V6_REASMMAX;
|
||||
|
||||
/* get counters */
|
||||
- entry->stats.ibytes.low = ifp->ifm_data.ifi_ibytes;
|
||||
- entry->stats.ibytes.high = 0;
|
||||
- entry->stats.iucast.low = ifp->ifm_data.ifi_ipackets;
|
||||
- entry->stats.iucast.high = 0;
|
||||
- entry->stats.imcast.low = ifp->ifm_data.ifi_imcasts;
|
||||
- entry->stats.imcast.high = 0;
|
||||
+ entry->stats.ibytes.low = ifp->ifm_data.ifi_ibytes & 0xffffffff;
|
||||
+ entry->stats.ibytes.high = ifp->ifm_data.ifi_ibytes >> 32;
|
||||
+ entry->stats.iucast.low = ifp->ifm_data.ifi_ipackets & 0xffffffff;
|
||||
+ entry->stats.iucast.high = ifp->ifm_data.ifi_ipackets >> 32;
|
||||
+ entry->stats.imcast.low = ifp->ifm_data.ifi_imcasts & 0xffffffff;
|
||||
+ entry->stats.imcast.high = ifp->ifm_data.ifi_imcasts >> 32;
|
||||
entry->stats.ierrors = ifp->ifm_data.ifi_ierrors;
|
||||
entry->stats.idiscards = ifp->ifm_data.ifi_iqdrops;
|
||||
entry->stats.iunknown_protos = ifp->ifm_data.ifi_noproto;
|
||||
|
||||
- entry->stats.obytes.low = ifp->ifm_data.ifi_obytes;
|
||||
- entry->stats.obytes.high = 0;
|
||||
- entry->stats.oucast.low = ifp->ifm_data.ifi_opackets;
|
||||
- entry->stats.oucast.high = 0;
|
||||
- entry->stats.omcast.low = ifp->ifm_data.ifi_omcasts;
|
||||
- entry->stats.omcast.high = 0;
|
||||
+ entry->stats.obytes.low = ifp->ifm_data.ifi_obytes & 0xffffffff;
|
||||
+ entry->stats.obytes.high = ifp->ifm_data.ifi_obytes >> 32;
|
||||
+ entry->stats.oucast.low = ifp->ifm_data.ifi_opackets & 0xffffffff;
|
||||
+ entry->stats.oucast.high = ifp->ifm_data.ifi_opackets >> 32;
|
||||
+ entry->stats.omcast.low = ifp->ifm_data.ifi_omcasts & 0xffffffff;
|
||||
+ entry->stats.omcast.high = ifp->ifm_data.ifi_omcasts >> 32;
|
||||
entry->stats.oerrors = ifp->ifm_data.ifi_oerrors;
|
||||
entry->ns_flags |= NETSNMP_INTERFACE_FLAGS_HAS_BYTES |
|
||||
NETSNMP_INTERFACE_FLAGS_HAS_DROPS |
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
PORTNAME= snmp
|
||||
PORTVERSION= 5.4.2.1
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= net-mgmt ipv6
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
||||
MASTER_SITE_SUBDIR= net-snmp
|
||||
|
41
net-mgmt/net-snmp/files/patch-interface_sysctl.c
Normal file
41
net-mgmt/net-snmp/files/patch-interface_sysctl.c
Normal file
@ -0,0 +1,41 @@
|
||||
Index: agent/mibgroup/if-mib/data_access/interface_sysctl.c
|
||||
===================================================================
|
||||
--- agent/mibgroup/if-mib/data_access/interface_sysctl.c (revision 17324)
|
||||
+++ agent/mibgroup/if-mib/data_access/interface_sysctl.c (working copy)
|
||||
@@ -451,22 +451,22 @@
|
||||
NETSNMP_INTERFACE_FLAGS_HAS_V6_REASMMAX;
|
||||
|
||||
/* get counters */
|
||||
- entry->stats.ibytes.low = ifp->ifm_data.ifi_ibytes;
|
||||
- entry->stats.ibytes.high = 0;
|
||||
- entry->stats.iucast.low = ifp->ifm_data.ifi_ipackets;
|
||||
- entry->stats.iucast.high = 0;
|
||||
- entry->stats.imcast.low = ifp->ifm_data.ifi_imcasts;
|
||||
- entry->stats.imcast.high = 0;
|
||||
+ entry->stats.ibytes.low = ifp->ifm_data.ifi_ibytes & 0xffffffff;
|
||||
+ entry->stats.ibytes.high = ifp->ifm_data.ifi_ibytes >> 32;
|
||||
+ entry->stats.iucast.low = ifp->ifm_data.ifi_ipackets & 0xffffffff;
|
||||
+ entry->stats.iucast.high = ifp->ifm_data.ifi_ipackets >> 32;
|
||||
+ entry->stats.imcast.low = ifp->ifm_data.ifi_imcasts & 0xffffffff;
|
||||
+ entry->stats.imcast.high = ifp->ifm_data.ifi_imcasts >> 32;
|
||||
entry->stats.ierrors = ifp->ifm_data.ifi_ierrors;
|
||||
entry->stats.idiscards = ifp->ifm_data.ifi_iqdrops;
|
||||
entry->stats.iunknown_protos = ifp->ifm_data.ifi_noproto;
|
||||
|
||||
- entry->stats.obytes.low = ifp->ifm_data.ifi_obytes;
|
||||
- entry->stats.obytes.high = 0;
|
||||
- entry->stats.oucast.low = ifp->ifm_data.ifi_opackets;
|
||||
- entry->stats.oucast.high = 0;
|
||||
- entry->stats.omcast.low = ifp->ifm_data.ifi_omcasts;
|
||||
- entry->stats.omcast.high = 0;
|
||||
+ entry->stats.obytes.low = ifp->ifm_data.ifi_obytes & 0xffffffff;
|
||||
+ entry->stats.obytes.high = ifp->ifm_data.ifi_obytes >> 32;
|
||||
+ entry->stats.oucast.low = ifp->ifm_data.ifi_opackets & 0xffffffff;
|
||||
+ entry->stats.oucast.high = ifp->ifm_data.ifi_opackets >> 32;
|
||||
+ entry->stats.omcast.low = ifp->ifm_data.ifi_omcasts & 0xffffffff;
|
||||
+ entry->stats.omcast.high = ifp->ifm_data.ifi_omcasts >> 32;
|
||||
entry->stats.oerrors = ifp->ifm_data.ifi_oerrors;
|
||||
entry->ns_flags |= NETSNMP_INTERFACE_FLAGS_HAS_BYTES |
|
||||
NETSNMP_INTERFACE_FLAGS_HAS_DROPS |
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user