]> git.gsnw.org Git - fping.git/commitdiff
Allow -4 option to be given multiple times when IPv6 is enabled.
authorNorman Rasmussen <norman@rasmussen.co.za>
Mon, 1 Mar 2021 06:28:44 +0000 (22:28 -0800)
committerNorman Rasmussen <norman@rasmussen.co.za>
Mon, 1 Mar 2021 06:28:44 +0000 (22:28 -0800)
src/fping.c

index c392fae3ae04ea59a1bd95da1d3ec07da6fffe65..574cab0d65c6ebab7113baf3f6a6e077630b04c4 100644 (file)
@@ -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);
             }