Using -p for check_dig seems to put the port option for drill after name and server arguments which does not seem to work when using drill. check_dig -v -H 10.10.10.10 -p 5353 -l test.test will run /usr/bin/drill @10.10.10.10 -z -p 5353 test.test A An ugly hack with a manual argument seems to work as the port argument will be placed earlier in the command. check_dig -v -H 10.10.10.10 -p 5353 -l test.test -A '-p 5353' will run /usr/bin/drill -p 5353 @10.10.10.10 -z -p 5353 test.test A The first drill command will ignore the port option but the second will work. The man pages for drill says "drill [ OPTIONS ] name [ @server ] [ type ] [ class ]" so this argument might need to be moved to a former position in the command. Maybe this should be solved in the extra-patch-dig-to-drill.diff file?
Yes, it should, the patch is a bit old, fixing it.
A commit references this bug: Author: mat Date: Mon Aug 31 12:39:59 UTC 2020 New revision: 547174 URL: https://svnweb.freebsd.org/changeset/ports/547174 Log: Fix check_dig when it uses drill and when changing the port. PR: 249027 Reported by: Joakim Lindblom Changes: head/net-mgmt/monitoring-plugins/Makefile head/net-mgmt/monitoring-plugins/files/extra-patch-dig-to-drill.diff head/net-mgmt/monitoring-plugins/pkg-help head/net-mgmt/monitoring-plugins/pkg-plist head/net-mgmt/nagios-plugins/Makefile head/net-mgmt/nagios-plugins/files/extra-patch-dig-to-drill.diff head/net-mgmt/nagios-plugins/pkg-plist