-
Problem report
-
Resolution: Unresolved
-
Minor
-
None
-
NetBSD 8.2, NetBSD 8.3, NetBSD 9.0, NetBSD 9.1, NetBSD 9.2, NetBSD 9.3, NetBSD 9.4, NetBSD 10.0
-
Sprint candidates
-
1
The NetBSD zbxsysinfo library variant uses the kernel virtual memory interface to retrieve statistics for network interfaces. It does this by inspecting the if_data member (of type struct if_data) of the struct ifnet describing an interface.
In the 8.2 release cycle, this member was removed from the ifnet structure, as it was duplicating parts of a child object of an other member (if_stats of type percpu_t). The if_stats member is opaque to user-land, however, meaning this is not the way for user-land programs to retrieve these stat bits. We have thus since been unable to build on NetBSD.
pkgsrc (the equivalent of the ports tree in FreeBSD and OpenBSD) contains a patch[1], originally committed by otis[at]netbsd[dot]org, that rewrites the entire thing to use the sysctl(2) interface that fills an if_data structure with the data.
Generally, this is a sounder approach than using kernel structs and touching kernel memory and everything that comes with managing that.
I suggest upstreaming the patch to supported versions, with attribution.
–
[1]: pkgsrc patch for Zabbix 5.0 src/libs/zbxsysinfo/netbsd/net.c
[2]: pkgsrc patch for Zabbix 6.0
[3]: pkgsrc patch for Zabbix
- related to
-
ZBX-25379 libzbxsysinfo FTBFS on NetBSD (proc.c)
- Ready for QA