Created attachment 151948 [details] check_dhcp.c fix The bug is reported here: https://github.com/nagios-plugins/nagios-plugins/issues/70 There is a bug in getting MAC address of network interface on BSD systems, where fourth parameter in sysctl() has to be size_t * and not int *. Unfortunately, using gcc -O2 the bug is hidden and contrary to compiler warning, check_dhcp seems to be working. However, when you use gcc -O0 or gcc -O1 or clang in FreeBSD 10 on amd64, the bug is exposed: ./check_dhcp -i em0 -s 127.0.0.1 Error: Couldn't get hardware address from em0. sysctl 2 error - No such file or directory. Until it is fixed in upstream, please add the patch to the current nagios-plugins 2.0.3. Thank you very much.
Auto-assigned to maintainer mat@FreeBSD.org
Oops, the name of the file had to be patch-plugins-root__check_dhcp.c
A commit references this bug: Author: mat Date: Wed Jan 21 13:11:30 UTC 2015 New revision: 377599 URL: https://svnweb.freebsd.org/changeset/ports/377599 Log: Fix check_dhcp. PR: 196964 Submitted by: Rudolf ?ejka Sponsored by: Absolight Changes: head/net-mgmt/monitoring-plugins/Makefile head/net-mgmt/monitoring-plugins/files/patch-plugins-root_check__dhcp.c head/net-mgmt/nagios-plugins/Makefile head/net-mgmt/nagios-plugins/files/patch-plugins-root_check__dhcp.c