pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
zabbix54-*: Update Zabbix to 5.4.7
Module Name: pkgsrc-wip
Committed By: Yuuki Enomoto <uki%e-yuuki.org@localhost>
Pushed By: e-yuuki
Date: Sun Oct 31 09:25:43 2021 +0900
Changeset: 8839d5599835a8496814804a3bb525fc0812ec4b
Modified Files:
zabbix54-agent/distinfo
zabbix54-agent/patches/patch-src_libs_zbxsysinfo_netbsd_net.c
zabbix54-frontend/distinfo
zabbix54-java/distinfo
zabbix54-proxy/distinfo
zabbix54-proxy/patches/patch-src_libs_zbxsysinfo_netbsd_net.c
zabbix54-server/Makefile.common
zabbix54-server/distinfo
zabbix54-server/patches/patch-src_libs_zbxsysinfo_netbsd_net.c
Log Message:
zabbix54-*: Update Zabbix to 5.4.7
Official release note: https://www.zabbix.com/rn/rn5.4.7
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=8839d5599835a8496814804a3bb525fc0812ec4b
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
zabbix54-agent/distinfo | 8 +-
.../patches/patch-src_libs_zbxsysinfo_netbsd_net.c | 100 ++++++++++-----------
zabbix54-frontend/distinfo | 6 +-
zabbix54-java/distinfo | 6 +-
zabbix54-proxy/distinfo | 8 +-
.../patches/patch-src_libs_zbxsysinfo_netbsd_net.c | 100 ++++++++++-----------
zabbix54-server/Makefile.common | 2 +-
zabbix54-server/distinfo | 8 +-
.../patches/patch-src_libs_zbxsysinfo_netbsd_net.c | 98 ++++++++++----------
9 files changed, 162 insertions(+), 174 deletions(-)
diffs:
diff --git a/zabbix54-agent/distinfo b/zabbix54-agent/distinfo
index 80df90b491..1d89d11815 100644
--- a/zabbix54-agent/distinfo
+++ b/zabbix54-agent/distinfo
@@ -1,8 +1,8 @@
$NetBSD$
-RMD160 (zabbix-5.4.4.tar.gz) = 6f5faa16e8566f3141ecda6ff05e566823befd93
-SHA512 (zabbix-5.4.4.tar.gz) = 6b5b012bc0c53502d97bc260f7c7f0293edba194fb05c65b05c5b4084cd3f05b00ba5e1c1ead1e42be39d740dc5c617a001c2d459c8157c1cab7136fb0054883
-Size (zabbix-5.4.4.tar.gz) = 24266079 bytes
+BLAKE2s (zabbix-5.4.7.tar.gz) = 8fb4bf6a53c966535475f4f1b294bb5c2cc5fd5f850e39a51d05c5638acc8faa
+SHA512 (zabbix-5.4.7.tar.gz) = f87fd158d74c289765ddc3394bfa1c009d72d2756596c2060d567b5e44123594f00307f4df28a67b38c0e59a9d26f7d064afe73e7a3a0bd4e9bc02529334b1d1
+Size (zabbix-5.4.7.tar.gz) = 24424262 bytes
SHA1 (patch-configure) = cf647b9ee52a96882d31f8783ac19b66e3e65105
-SHA1 (patch-src_libs_zbxsysinfo_netbsd_net.c) = 468f2112a3d65b0a73f371194ae15ce0df0ad71c
+SHA1 (patch-src_libs_zbxsysinfo_netbsd_net.c) = 0371a5cafe00d01f293a847105f7c501f443616c
SHA1 (patch-src_zabbix__agent_Makefile.in) = efbd804ecee4b99db36db5f4fd61583b2ef96a86
diff --git a/zabbix54-agent/patches/patch-src_libs_zbxsysinfo_netbsd_net.c b/zabbix54-agent/patches/patch-src_libs_zbxsysinfo_netbsd_net.c
index 2a4a0d4332..3ac229d762 100644
--- a/zabbix54-agent/patches/patch-src_libs_zbxsysinfo_netbsd_net.c
+++ b/zabbix54-agent/patches/patch-src_libs_zbxsysinfo_netbsd_net.c
@@ -1,8 +1,8 @@
-$NetBSD: patch-src_libs_zbxsysinfo_netbsd_net.c,v 1.1 2020/11/03 22:46:23 otis Exp $
+$NetBSD: patch-src_libs_zbxsysinfo_netbsd_net.c,v 1.1 2020/11/03 22:44:43 otis Exp $
Rework interface statistics code from using kvm to using sysctl interface.
---- src/libs/zbxsysinfo/netbsd/net.c.orig 2020-08-24 09:42:55.000000000 +0000
+--- src/libs/zbxsysinfo/netbsd/net.c.orig 2021-10-25 09:49:27.000000000 +0000
+++ src/libs/zbxsysinfo/netbsd/net.c
@@ -22,6 +22,9 @@
#include "zbxjson.h"
@@ -14,25 +14,24 @@ Rework interface statistics code from using kvm to using sysctl interface.
static struct nlist kernel_symbols[] =
{
{"_ifnet", N_UNDF, 0, 0, 0},
-@@ -31,43 +34,91 @@ static struct nlist kernel_symbols[] =
+@@ -31,42 +34,91 @@ static struct nlist kernel_symbols[] =
#define IFNET_ID 0
+static void
+get_rtaddrs(int addrs, struct sockaddr *sa, struct sockaddr **rti_info)
+{
-+ int i;
++ int i;
+
-+ for (i = 0; i < RTAX_MAX; i++) {
-+ if (addrs & (1 << i)) {
-+ rti_info[i] = sa;
-+ sa = (struct sockaddr *)((char *)(sa) +
-+ RT_ROUNDUP(sa->sa_len));
-+ } else
-+ rti_info[i] = NULL;
-+ }
++ for (i = 0; i < RTAX_MAX; i++) {
++ if (addrs & (1 << i)) {
++ rti_info[i] = sa;
++ sa = (struct sockaddr *)((char *)(sa) +
++ RT_ROUNDUP(sa->sa_len));
++ } else
++ rti_info[i] = NULL;
++ }
+}
-+
+
static int get_ifdata(const char *if_name,
zbx_uint64_t *ibytes, zbx_uint64_t *ipackets, zbx_uint64_t *ierrors, zbx_uint64_t *idropped,
@@ -43,12 +42,8 @@ Rework interface statistics code from using kvm to using sysctl interface.
- struct ifnet_head head;
- struct ifnet *ifp;
- struct ifnet v;
--
-- kvm_t *kp;
-- int len = 0;
-- int ret = SYSINFO_RET_FAIL;
+ struct if_msghdr *ifm;
-+ int mib[6] = { CTL_NET, AF_ROUTE, 0, 0, NET_RT_IFLIST, 0 };
++ int mib[6] = { CTL_NET, AF_ROUTE, 0, 0, NET_RT_IFLIST, 0 };
+ char *buf = NULL;
+ char *lim, *next;
+ struct rt_msghdr *rtm;
@@ -59,7 +54,9 @@ Rework interface statistics code from using kvm to using sysctl interface.
+ size_t len = 0;
+ size_t olen = 0;
+ int ret = SYSINFO_RET_FAIL;
-+
+
+- kvm_t *kp;
+- int ret = SYSINFO_RET_FAIL;
+ static char name[IFNAMSIZ];
if (NULL == if_name || '\0' == *if_name)
@@ -75,63 +72,62 @@ Rework interface statistics code from using kvm to using sysctl interface.
- *error = zbx_strdup(NULL, "Cannot obtain a descriptor to access kernel virtual memory.");
- return FAIL;
- }
--
+
- if (N_UNDF == kernel_symbols[IFNET_ID].n_type)
- if (0 != kvm_nlist(kp, &kernel_symbols[0]))
- kernel_symbols[IFNET_ID].n_type = N_UNDF;
-
- if (N_UNDF != kernel_symbols[IFNET_ID].n_type)
- {
-- len = sizeof(struct ifnet_head);
--
-- if (kvm_read(kp, kernel_symbols[IFNET_ID].n_value, &head, len) >= len)
-- {
-- len = sizeof(struct ifnet);
-+ if (sysctl(mib, 6, NULL, &len, NULL, 0) == -1) {
-+ *error = zbx_strdup(NULL, "Failed to read network interfaces data");
+- int len = sizeof(struct ifnet_head);
++ if (sysctl(mib, 6, NULL, &len, NULL, 0) == -1) {
++ *error = zbx_strdup(NULL, "Failed to read network interfaces data");
+ ret = FAIL;
+ goto out;
+ }
-+
-+ if (len > olen) {
-+ free(buf);
-+ if ((buf = zbx_malloc(NULL, len)) == NULL) {
+
+- if (kvm_read(kp, kernel_symbols[IFNET_ID].n_value, &head, len) >= len)
+- {
+- len = sizeof(struct ifnet);
++ if (len > olen) {
++ free(buf);
++ if ((buf = zbx_malloc(NULL, len)) == NULL) {
+ *error = zbx_strdup(NULL, "Failed to allocate buffer for network interfaces data");
+ ret = FAIL;
+ goto out;
+ }
-+ olen = len;
-+ }
-+ if (sysctl(mib, 6, buf, &len, NULL, 0) == -1) {
++ olen = len;
++ }
++ if (sysctl(mib, 6, buf, &len, NULL, 0) == -1) {
+ *error = zbx_strdup(NULL, "Failed to allocate buffer for network interfaces data");
+ ret = FAIL;
+ goto out;
+ }
+
+ lim = buf + len;
-+ for (next = buf; next < lim; next += rtm->rtm_msglen) {
-+ rtm = (struct rt_msghdr *)next;
-+ if ((rtm->rtm_version == RTM_VERSION) &&
-+ (rtm->rtm_type == RTM_IFINFO)) {
-+ ifm = (struct if_msghdr *)next;
-+ ifd = &ifm->ifm_data;
++ for (next = buf; next < lim; next += rtm->rtm_msglen) {
++ rtm = (struct rt_msghdr *)next;
++ if ((rtm->rtm_version == RTM_VERSION) &&
++ (rtm->rtm_type == RTM_IFINFO)) {
++ ifm = (struct if_msghdr *)next;
++ ifd = &ifm->ifm_data;
+
-+ sa = (struct sockaddr *)(ifm + 1);
-+ get_rtaddrs(ifm->ifm_addrs, sa, rti_info);
++ sa = (struct sockaddr *)(ifm + 1);
++ get_rtaddrs(ifm->ifm_addrs, sa, rti_info);
+
-+ sdl = (struct sockaddr_dl *)rti_info[RTAX_IFP];
-+ if (sdl == NULL || sdl->sdl_family != AF_LINK) {
-+ continue;
-+ }
-+ bzero(name, sizeof(name));
-+ if (sdl->sdl_nlen >= IFNAMSIZ)
-+ memcpy(name, sdl->sdl_data, IFNAMSIZ - 1);
-+ else if (sdl->sdl_nlen > 0)
-+ memcpy(name, sdl->sdl_data, sdl->sdl_nlen);
++ sdl = (struct sockaddr_dl *)rti_info[RTAX_IFP];
++ if (sdl == NULL || sdl->sdl_family != AF_LINK) {
++ continue;
++ }
++ bzero(name, sizeof(name));
++ if (sdl->sdl_nlen >= IFNAMSIZ)
++ memcpy(name, sdl->sdl_data, IFNAMSIZ - 1);
++ else if (sdl->sdl_nlen > 0)
++ memcpy(name, sdl->sdl_data, sdl->sdl_nlen);
/* if_ibytes; total number of octets received */
/* if_ipackets; packets received on interface */
-@@ -101,42 +152,38 @@ static int get_ifdata(const char *if_nam
+@@ -100,42 +152,38 @@ static int get_ifdata(const char *if_nam
if (icollisions)
*icollisions = 0;
diff --git a/zabbix54-frontend/distinfo b/zabbix54-frontend/distinfo
index b77fb5d33e..06b27cd310 100644
--- a/zabbix54-frontend/distinfo
+++ b/zabbix54-frontend/distinfo
@@ -1,5 +1,5 @@
$NetBSD$
-RMD160 (zabbix-5.4.4.tar.gz) = 6f5faa16e8566f3141ecda6ff05e566823befd93
-SHA512 (zabbix-5.4.4.tar.gz) = 6b5b012bc0c53502d97bc260f7c7f0293edba194fb05c65b05c5b4084cd3f05b00ba5e1c1ead1e42be39d740dc5c617a001c2d459c8157c1cab7136fb0054883
-Size (zabbix-5.4.4.tar.gz) = 24266079 bytes
+BLAKE2s (zabbix-5.4.7.tar.gz) = 8fb4bf6a53c966535475f4f1b294bb5c2cc5fd5f850e39a51d05c5638acc8faa
+SHA512 (zabbix-5.4.7.tar.gz) = f87fd158d74c289765ddc3394bfa1c009d72d2756596c2060d567b5e44123594f00307f4df28a67b38c0e59a9d26f7d064afe73e7a3a0bd4e9bc02529334b1d1
+Size (zabbix-5.4.7.tar.gz) = 24424262 bytes
diff --git a/zabbix54-java/distinfo b/zabbix54-java/distinfo
index a3ddb0d7bf..a9602e2ca5 100644
--- a/zabbix54-java/distinfo
+++ b/zabbix54-java/distinfo
@@ -1,6 +1,6 @@
$NetBSD$
-RMD160 (zabbix-5.4.4.tar.gz) = 6f5faa16e8566f3141ecda6ff05e566823befd93
-SHA512 (zabbix-5.4.4.tar.gz) = 6b5b012bc0c53502d97bc260f7c7f0293edba194fb05c65b05c5b4084cd3f05b00ba5e1c1ead1e42be39d740dc5c617a001c2d459c8157c1cab7136fb0054883
-Size (zabbix-5.4.4.tar.gz) = 24266079 bytes
+BLAKE2s (zabbix-5.4.7.tar.gz) = 8fb4bf6a53c966535475f4f1b294bb5c2cc5fd5f850e39a51d05c5638acc8faa
+SHA512 (zabbix-5.4.7.tar.gz) = f87fd158d74c289765ddc3394bfa1c009d72d2756596c2060d567b5e44123594f00307f4df28a67b38c0e59a9d26f7d064afe73e7a3a0bd4e9bc02529334b1d1
+Size (zabbix-5.4.7.tar.gz) = 24424262 bytes
SHA1 (patch-configure) = cf647b9ee52a96882d31f8783ac19b66e3e65105
diff --git a/zabbix54-proxy/distinfo b/zabbix54-proxy/distinfo
index 89d4d696e0..ab2f8fe840 100644
--- a/zabbix54-proxy/distinfo
+++ b/zabbix54-proxy/distinfo
@@ -1,9 +1,9 @@
$NetBSD$
-RMD160 (zabbix-5.4.4.tar.gz) = 6f5faa16e8566f3141ecda6ff05e566823befd93
-SHA512 (zabbix-5.4.4.tar.gz) = 6b5b012bc0c53502d97bc260f7c7f0293edba194fb05c65b05c5b4084cd3f05b00ba5e1c1ead1e42be39d740dc5c617a001c2d459c8157c1cab7136fb0054883
-Size (zabbix-5.4.4.tar.gz) = 24266079 bytes
+BLAKE2s (zabbix-5.4.7.tar.gz) = 8fb4bf6a53c966535475f4f1b294bb5c2cc5fd5f850e39a51d05c5638acc8faa
+SHA512 (zabbix-5.4.7.tar.gz) = f87fd158d74c289765ddc3394bfa1c009d72d2756596c2060d567b5e44123594f00307f4df28a67b38c0e59a9d26f7d064afe73e7a3a0bd4e9bc02529334b1d1
+Size (zabbix-5.4.7.tar.gz) = 24424262 bytes
SHA1 (patch-m4_ax__lib__mysql.m4) = 9786c6bff3d22334263921c201bf241a207a46bc
SHA1 (patch-m4_libssh.m4) = 8b4ac3964caf94bb0e4939d265dcefc08a07a0df
-SHA1 (patch-src_libs_zbxsysinfo_netbsd_net.c) = 468f2112a3d65b0a73f371194ae15ce0df0ad71c
+SHA1 (patch-src_libs_zbxsysinfo_netbsd_net.c) = 0371a5cafe00d01f293a847105f7c501f443616c
SHA1 (patch-src_zabbix__proxy_Makefile.am) = 9d2c3d5ca06e676154653b70f0931ed2ea281cf5
diff --git a/zabbix54-proxy/patches/patch-src_libs_zbxsysinfo_netbsd_net.c b/zabbix54-proxy/patches/patch-src_libs_zbxsysinfo_netbsd_net.c
index 8cceedbf42..3ac229d762 100644
--- a/zabbix54-proxy/patches/patch-src_libs_zbxsysinfo_netbsd_net.c
+++ b/zabbix54-proxy/patches/patch-src_libs_zbxsysinfo_netbsd_net.c
@@ -1,8 +1,8 @@
-$NetBSD: patch-src_libs_zbxsysinfo_netbsd_net.c,v 1.1 2020/11/03 22:45:39 otis Exp $
+$NetBSD: patch-src_libs_zbxsysinfo_netbsd_net.c,v 1.1 2020/11/03 22:44:43 otis Exp $
Rework interface statistics code from using kvm to using sysctl interface.
---- src/libs/zbxsysinfo/netbsd/net.c.orig 2020-08-24 09:42:55.000000000 +0000
+--- src/libs/zbxsysinfo/netbsd/net.c.orig 2021-10-25 09:49:27.000000000 +0000
+++ src/libs/zbxsysinfo/netbsd/net.c
@@ -22,6 +22,9 @@
#include "zbxjson.h"
@@ -14,25 +14,24 @@ Rework interface statistics code from using kvm to using sysctl interface.
static struct nlist kernel_symbols[] =
{
{"_ifnet", N_UNDF, 0, 0, 0},
-@@ -31,43 +34,91 @@ static struct nlist kernel_symbols[] =
+@@ -31,42 +34,91 @@ static struct nlist kernel_symbols[] =
#define IFNET_ID 0
+static void
+get_rtaddrs(int addrs, struct sockaddr *sa, struct sockaddr **rti_info)
+{
-+ int i;
++ int i;
+
-+ for (i = 0; i < RTAX_MAX; i++) {
-+ if (addrs & (1 << i)) {
-+ rti_info[i] = sa;
-+ sa = (struct sockaddr *)((char *)(sa) +
-+ RT_ROUNDUP(sa->sa_len));
-+ } else
-+ rti_info[i] = NULL;
-+ }
++ for (i = 0; i < RTAX_MAX; i++) {
++ if (addrs & (1 << i)) {
++ rti_info[i] = sa;
++ sa = (struct sockaddr *)((char *)(sa) +
++ RT_ROUNDUP(sa->sa_len));
++ } else
++ rti_info[i] = NULL;
++ }
+}
-+
+
static int get_ifdata(const char *if_name,
zbx_uint64_t *ibytes, zbx_uint64_t *ipackets, zbx_uint64_t *ierrors, zbx_uint64_t *idropped,
@@ -43,12 +42,8 @@ Rework interface statistics code from using kvm to using sysctl interface.
- struct ifnet_head head;
- struct ifnet *ifp;
- struct ifnet v;
--
-- kvm_t *kp;
-- int len = 0;
-- int ret = SYSINFO_RET_FAIL;
+ struct if_msghdr *ifm;
-+ int mib[6] = { CTL_NET, AF_ROUTE, 0, 0, NET_RT_IFLIST, 0 };
++ int mib[6] = { CTL_NET, AF_ROUTE, 0, 0, NET_RT_IFLIST, 0 };
+ char *buf = NULL;
+ char *lim, *next;
+ struct rt_msghdr *rtm;
@@ -59,7 +54,9 @@ Rework interface statistics code from using kvm to using sysctl interface.
+ size_t len = 0;
+ size_t olen = 0;
+ int ret = SYSINFO_RET_FAIL;
-+
+
+- kvm_t *kp;
+- int ret = SYSINFO_RET_FAIL;
+ static char name[IFNAMSIZ];
if (NULL == if_name || '\0' == *if_name)
@@ -75,63 +72,62 @@ Rework interface statistics code from using kvm to using sysctl interface.
- *error = zbx_strdup(NULL, "Cannot obtain a descriptor to access kernel virtual memory.");
- return FAIL;
- }
--
+
- if (N_UNDF == kernel_symbols[IFNET_ID].n_type)
- if (0 != kvm_nlist(kp, &kernel_symbols[0]))
- kernel_symbols[IFNET_ID].n_type = N_UNDF;
-
- if (N_UNDF != kernel_symbols[IFNET_ID].n_type)
- {
-- len = sizeof(struct ifnet_head);
--
-- if (kvm_read(kp, kernel_symbols[IFNET_ID].n_value, &head, len) >= len)
-- {
-- len = sizeof(struct ifnet);
-+ if (sysctl(mib, 6, NULL, &len, NULL, 0) == -1) {
-+ *error = zbx_strdup(NULL, "Failed to read network interfaces data");
+- int len = sizeof(struct ifnet_head);
++ if (sysctl(mib, 6, NULL, &len, NULL, 0) == -1) {
++ *error = zbx_strdup(NULL, "Failed to read network interfaces data");
+ ret = FAIL;
+ goto out;
+ }
-+
-+ if (len > olen) {
-+ free(buf);
-+ if ((buf = zbx_malloc(NULL, len)) == NULL) {
+
+- if (kvm_read(kp, kernel_symbols[IFNET_ID].n_value, &head, len) >= len)
+- {
+- len = sizeof(struct ifnet);
++ if (len > olen) {
++ free(buf);
++ if ((buf = zbx_malloc(NULL, len)) == NULL) {
+ *error = zbx_strdup(NULL, "Failed to allocate buffer for network interfaces data");
+ ret = FAIL;
+ goto out;
+ }
-+ olen = len;
-+ }
-+ if (sysctl(mib, 6, buf, &len, NULL, 0) == -1) {
++ olen = len;
++ }
++ if (sysctl(mib, 6, buf, &len, NULL, 0) == -1) {
+ *error = zbx_strdup(NULL, "Failed to allocate buffer for network interfaces data");
+ ret = FAIL;
+ goto out;
+ }
+
+ lim = buf + len;
-+ for (next = buf; next < lim; next += rtm->rtm_msglen) {
-+ rtm = (struct rt_msghdr *)next;
-+ if ((rtm->rtm_version == RTM_VERSION) &&
-+ (rtm->rtm_type == RTM_IFINFO)) {
-+ ifm = (struct if_msghdr *)next;
-+ ifd = &ifm->ifm_data;
++ for (next = buf; next < lim; next += rtm->rtm_msglen) {
++ rtm = (struct rt_msghdr *)next;
++ if ((rtm->rtm_version == RTM_VERSION) &&
++ (rtm->rtm_type == RTM_IFINFO)) {
++ ifm = (struct if_msghdr *)next;
++ ifd = &ifm->ifm_data;
+
-+ sa = (struct sockaddr *)(ifm + 1);
-+ get_rtaddrs(ifm->ifm_addrs, sa, rti_info);
++ sa = (struct sockaddr *)(ifm + 1);
++ get_rtaddrs(ifm->ifm_addrs, sa, rti_info);
+
-+ sdl = (struct sockaddr_dl *)rti_info[RTAX_IFP];
-+ if (sdl == NULL || sdl->sdl_family != AF_LINK) {
-+ continue;
-+ }
-+ bzero(name, sizeof(name));
-+ if (sdl->sdl_nlen >= IFNAMSIZ)
-+ memcpy(name, sdl->sdl_data, IFNAMSIZ - 1);
-+ else if (sdl->sdl_nlen > 0)
-+ memcpy(name, sdl->sdl_data, sdl->sdl_nlen);
++ sdl = (struct sockaddr_dl *)rti_info[RTAX_IFP];
++ if (sdl == NULL || sdl->sdl_family != AF_LINK) {
++ continue;
++ }
++ bzero(name, sizeof(name));
++ if (sdl->sdl_nlen >= IFNAMSIZ)
++ memcpy(name, sdl->sdl_data, IFNAMSIZ - 1);
++ else if (sdl->sdl_nlen > 0)
++ memcpy(name, sdl->sdl_data, sdl->sdl_nlen);
/* if_ibytes; total number of octets received */
/* if_ipackets; packets received on interface */
-@@ -101,42 +152,38 @@ static int get_ifdata(const char *if_nam
+@@ -100,42 +152,38 @@ static int get_ifdata(const char *if_nam
if (icollisions)
*icollisions = 0;
diff --git a/zabbix54-server/Makefile.common b/zabbix54-server/Makefile.common
index 2838fd6f7f..bbec193a4d 100644
--- a/zabbix54-server/Makefile.common
+++ b/zabbix54-server/Makefile.common
@@ -5,7 +5,7 @@
# used by wip/zabbix54-frontend/Makefile
# used by wip/zabbix54-java/Makefile
-DISTNAME= zabbix-5.4.4
+DISTNAME= zabbix-5.4.7
CATEGORIES= sysutils
MASTER_SITES= https://cdn.zabbix.com/zabbix/sources/stable/5.4/
diff --git a/zabbix54-server/distinfo b/zabbix54-server/distinfo
index 480825ad05..9cf0bfc1d8 100644
--- a/zabbix54-server/distinfo
+++ b/zabbix54-server/distinfo
@@ -1,9 +1,9 @@
$NetBSD$
-RMD160 (zabbix-5.4.4.tar.gz) = 6f5faa16e8566f3141ecda6ff05e566823befd93
-SHA512 (zabbix-5.4.4.tar.gz) = 6b5b012bc0c53502d97bc260f7c7f0293edba194fb05c65b05c5b4084cd3f05b00ba5e1c1ead1e42be39d740dc5c617a001c2d459c8157c1cab7136fb0054883
-Size (zabbix-5.4.4.tar.gz) = 24266079 bytes
+BLAKE2s (zabbix-5.4.7.tar.gz) = 8fb4bf6a53c966535475f4f1b294bb5c2cc5fd5f850e39a51d05c5638acc8faa
+SHA512 (zabbix-5.4.7.tar.gz) = f87fd158d74c289765ddc3394bfa1c009d72d2756596c2060d567b5e44123594f00307f4df28a67b38c0e59a9d26f7d064afe73e7a3a0bd4e9bc02529334b1d1
+Size (zabbix-5.4.7.tar.gz) = 24424262 bytes
SHA1 (patch-m4_ax__lib__mysql.m4) = 9786c6bff3d22334263921c201bf241a207a46bc
SHA1 (patch-m4_libssh.m4) = 8b4ac3964caf94bb0e4939d265dcefc08a07a0df
-SHA1 (patch-src_libs_zbxsysinfo_netbsd_net.c) = 468f2112a3d65b0a73f371194ae15ce0df0ad71c
+SHA1 (patch-src_libs_zbxsysinfo_netbsd_net.c) = 0371a5cafe00d01f293a847105f7c501f443616c
SHA1 (patch-src_zabbix__server_Makefile.am) = d139b4fedf8f443fbe9966256e98374d5e5cdb67
diff --git a/zabbix54-server/patches/patch-src_libs_zbxsysinfo_netbsd_net.c b/zabbix54-server/patches/patch-src_libs_zbxsysinfo_netbsd_net.c
index abacb94a67..3ac229d762 100644
--- a/zabbix54-server/patches/patch-src_libs_zbxsysinfo_netbsd_net.c
+++ b/zabbix54-server/patches/patch-src_libs_zbxsysinfo_netbsd_net.c
@@ -2,7 +2,7 @@ $NetBSD: patch-src_libs_zbxsysinfo_netbsd_net.c,v 1.1 2020/11/03 22:44:43 otis E
Rework interface statistics code from using kvm to using sysctl interface.
---- src/libs/zbxsysinfo/netbsd/net.c.orig 2020-08-24 09:42:55.000000000 +0000
+--- src/libs/zbxsysinfo/netbsd/net.c.orig 2021-10-25 09:49:27.000000000 +0000
+++ src/libs/zbxsysinfo/netbsd/net.c
@@ -22,6 +22,9 @@
#include "zbxjson.h"
@@ -14,25 +14,24 @@ Rework interface statistics code from using kvm to using sysctl interface.
static struct nlist kernel_symbols[] =
{
{"_ifnet", N_UNDF, 0, 0, 0},
-@@ -31,43 +34,91 @@ static struct nlist kernel_symbols[] =
+@@ -31,42 +34,91 @@ static struct nlist kernel_symbols[] =
#define IFNET_ID 0
+static void
+get_rtaddrs(int addrs, struct sockaddr *sa, struct sockaddr **rti_info)
+{
-+ int i;
++ int i;
+
-+ for (i = 0; i < RTAX_MAX; i++) {
-+ if (addrs & (1 << i)) {
-+ rti_info[i] = sa;
-+ sa = (struct sockaddr *)((char *)(sa) +
-+ RT_ROUNDUP(sa->sa_len));
-+ } else
-+ rti_info[i] = NULL;
-+ }
++ for (i = 0; i < RTAX_MAX; i++) {
++ if (addrs & (1 << i)) {
++ rti_info[i] = sa;
++ sa = (struct sockaddr *)((char *)(sa) +
++ RT_ROUNDUP(sa->sa_len));
++ } else
++ rti_info[i] = NULL;
++ }
+}
-+
+
static int get_ifdata(const char *if_name,
zbx_uint64_t *ibytes, zbx_uint64_t *ipackets, zbx_uint64_t *ierrors, zbx_uint64_t *idropped,
@@ -43,12 +42,8 @@ Rework interface statistics code from using kvm to using sysctl interface.
- struct ifnet_head head;
- struct ifnet *ifp;
- struct ifnet v;
--
-- kvm_t *kp;
-- int len = 0;
-- int ret = SYSINFO_RET_FAIL;
+ struct if_msghdr *ifm;
-+ int mib[6] = { CTL_NET, AF_ROUTE, 0, 0, NET_RT_IFLIST, 0 };
++ int mib[6] = { CTL_NET, AF_ROUTE, 0, 0, NET_RT_IFLIST, 0 };
+ char *buf = NULL;
+ char *lim, *next;
+ struct rt_msghdr *rtm;
@@ -59,7 +54,9 @@ Rework interface statistics code from using kvm to using sysctl interface.
+ size_t len = 0;
+ size_t olen = 0;
+ int ret = SYSINFO_RET_FAIL;
-+
+
+- kvm_t *kp;
+- int ret = SYSINFO_RET_FAIL;
+ static char name[IFNAMSIZ];
if (NULL == if_name || '\0' == *if_name)
@@ -75,63 +72,62 @@ Rework interface statistics code from using kvm to using sysctl interface.
- *error = zbx_strdup(NULL, "Cannot obtain a descriptor to access kernel virtual memory.");
- return FAIL;
- }
--
+
- if (N_UNDF == kernel_symbols[IFNET_ID].n_type)
- if (0 != kvm_nlist(kp, &kernel_symbols[0]))
- kernel_symbols[IFNET_ID].n_type = N_UNDF;
-
- if (N_UNDF != kernel_symbols[IFNET_ID].n_type)
- {
-- len = sizeof(struct ifnet_head);
--
-- if (kvm_read(kp, kernel_symbols[IFNET_ID].n_value, &head, len) >= len)
-- {
-- len = sizeof(struct ifnet);
-+ if (sysctl(mib, 6, NULL, &len, NULL, 0) == -1) {
-+ *error = zbx_strdup(NULL, "Failed to read network interfaces data");
+- int len = sizeof(struct ifnet_head);
++ if (sysctl(mib, 6, NULL, &len, NULL, 0) == -1) {
++ *error = zbx_strdup(NULL, "Failed to read network interfaces data");
+ ret = FAIL;
+ goto out;
+ }
-+
-+ if (len > olen) {
-+ free(buf);
-+ if ((buf = zbx_malloc(NULL, len)) == NULL) {
+
+- if (kvm_read(kp, kernel_symbols[IFNET_ID].n_value, &head, len) >= len)
+- {
+- len = sizeof(struct ifnet);
++ if (len > olen) {
++ free(buf);
++ if ((buf = zbx_malloc(NULL, len)) == NULL) {
+ *error = zbx_strdup(NULL, "Failed to allocate buffer for network interfaces data");
+ ret = FAIL;
+ goto out;
+ }
-+ olen = len;
-+ }
-+ if (sysctl(mib, 6, buf, &len, NULL, 0) == -1) {
++ olen = len;
++ }
++ if (sysctl(mib, 6, buf, &len, NULL, 0) == -1) {
+ *error = zbx_strdup(NULL, "Failed to allocate buffer for network interfaces data");
+ ret = FAIL;
+ goto out;
+ }
+
+ lim = buf + len;
-+ for (next = buf; next < lim; next += rtm->rtm_msglen) {
-+ rtm = (struct rt_msghdr *)next;
-+ if ((rtm->rtm_version == RTM_VERSION) &&
-+ (rtm->rtm_type == RTM_IFINFO)) {
-+ ifm = (struct if_msghdr *)next;
-+ ifd = &ifm->ifm_data;
++ for (next = buf; next < lim; next += rtm->rtm_msglen) {
++ rtm = (struct rt_msghdr *)next;
++ if ((rtm->rtm_version == RTM_VERSION) &&
++ (rtm->rtm_type == RTM_IFINFO)) {
++ ifm = (struct if_msghdr *)next;
++ ifd = &ifm->ifm_data;
+
-+ sa = (struct sockaddr *)(ifm + 1);
-+ get_rtaddrs(ifm->ifm_addrs, sa, rti_info);
++ sa = (struct sockaddr *)(ifm + 1);
++ get_rtaddrs(ifm->ifm_addrs, sa, rti_info);
+
-+ sdl = (struct sockaddr_dl *)rti_info[RTAX_IFP];
-+ if (sdl == NULL || sdl->sdl_family != AF_LINK) {
-+ continue;
-+ }
-+ bzero(name, sizeof(name));
-+ if (sdl->sdl_nlen >= IFNAMSIZ)
-+ memcpy(name, sdl->sdl_data, IFNAMSIZ - 1);
-+ else if (sdl->sdl_nlen > 0)
-+ memcpy(name, sdl->sdl_data, sdl->sdl_nlen);
++ sdl = (struct sockaddr_dl *)rti_info[RTAX_IFP];
++ if (sdl == NULL || sdl->sdl_family != AF_LINK) {
++ continue;
++ }
++ bzero(name, sizeof(name));
++ if (sdl->sdl_nlen >= IFNAMSIZ)
++ memcpy(name, sdl->sdl_data, IFNAMSIZ - 1);
++ else if (sdl->sdl_nlen > 0)
++ memcpy(name, sdl->sdl_data, sdl->sdl_nlen);
/* if_ibytes; total number of octets received */
/* if_ipackets; packets received on interface */
-@@ -101,42 +152,38 @@ static int get_ifdata(const char *if_nam
+@@ -100,42 +152,38 @@ static int get_ifdata(const char *if_nam
if (icollisions)
*icollisions = 0;
Home |
Main Index |
Thread Index |
Old Index