Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-25382

libzbxsysinfo FTBFS on NetBSD (net.c)

XMLWordPrintable

    • 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

            jlambda Juris Lambda
            jlambda Juris Lambda
            Team B
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 3h
                3h