From e432f46e01e85c8a5a3f690cd9e753157b453ab2 Mon Sep 17 00:00:00 2001 From: Norman Rasmussen Date: Sun, 28 Feb 2021 22:28:44 -0800 Subject: [PATCH] Allow -4 option to be given multiple times when IPv6 is enabled. --- src/fping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }