From: Norman Rasmussen Date: Mon, 1 Mar 2021 06:28:44 +0000 (-0800) Subject: Allow -4 option to be given multiple times when IPv6 is enabled. X-Git-Url: https://git.gsnw.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e432f46e01e85c8a5a3f690cd9e753157b453ab2;p=fping.git Allow -4 option to be given multiple times when IPv6 is enabled. --- diff --git a/src/fping.c b/src/fping.c index c392fae..574cab0 100644 --- a/src/fping.c +++ b/src/fping.c @@ -546,7 +546,7 @@ int main(int argc, char** argv) switch (c) { case '4': #ifdef IPV6 - if (hints_ai_family != AF_UNSPEC) { + if (hints_ai_family != AF_UNSPEC && hints_ai_family != AF_INET) { fprintf(stderr, "%s: can't specify both -4 and -6\n", prog); exit(1); }