If one builds and uses net/fping version 4.2 with option IPV6 disabled, the command fping -4 always fails with wrong error message: fping: can't specify both -4 and -6 This makes it impossible using fping probes with SmokePing as it runs fping with -4 option. If src/fping.c is compiled without IPV6 defined, its global variable "hints_ai_family" has initial value AF_INET but following code assumes it should be AF_UNSPEC before processing options. Either port options IPV6 should be removed, or a patch added fixing the problem: --- fping.c.orig 2019-02-20 03:54:45.000000000 +0700 +++ fping.c 2019-06-05 04:05:50.930412000 +0700 @@ -427,7 +427,7 @@ while ((c = optparse_long(&optparse_state, longopts, NULL)) != EOF) { switch (c) { case '4': - if (hints_ai_family != AF_UNSPEC) { + if (hints_ai_family == AF_INET6) { fprintf(stderr, "%s: can't specify both -4 and -6\n", prog); exit(1); }
@Eugene Could you include the proposed patch as an attachment (against the port using make makepatch) please, and also confirm the port passes QA (poudriere) with this patch. That will enable me/us to approve it under blanket: build fix for you to commit ^Triage: Reporter is committer, assign accordingly
(In reply to Kubilay Kocak from comment #1) No need to rush. If maintainer approves, I'll commit it myself.
A commit references this bug: Author: eugen Date: Wed Jun 19 20:07:45 UTC 2019 New revision: 504585 URL: https://svnweb.freebsd.org/changeset/ports/504585 Log: net/fping: fix WITHOUT_IPV6 mode If one builds and uses net/fping version 4.2 with option IPV6 disabled, the command fping -4 always fails with wrong error message: fping: can't specify both -4 and -6 This makes it impossible using fping probes with SmokePing as it runs fping with -4 option. This change fixes this. Also, do not install symlinks for fping6 and manual in this case. PORTREVISION not bumped as default build is not affected. PR: 238327 Approved by: jharris@widomaker.com (maintainter timeout, 2 weeks) Changes: head/net/fping/Makefile head/net/fping/files/ head/net/fping/files/patch-src_fping.c head/net/fping/pkg-plist
Fix commited. No MFH needed as default build not affected.