]> git.gsnw.org Git - fping.git/commitdiff
Do not fail if using fping6 with -6 flag
authorJohan Ström <johan@stromnet.se>
Tue, 25 Jun 2019 12:03:14 +0000 (14:03 +0200)
committerJohan Ström <johan@stromnet.se>
Tue, 25 Jun 2019 12:03:14 +0000 (14:03 +0200)
Mostly for backwards compatability

src/fping.c

index 4a0c60a1f554ced96cbda5e18a09807abcccb3c9..9650db9185d64551ea5f3db90e9ca5f24adb5c79 100644 (file)
@@ -435,7 +435,7 @@ int main(int argc, char** argv)
             break;
         case '6':
 #ifdef IPV6
-            if (hints_ai_family != AF_UNSPEC) {
+            if (hints_ai_family != AF_UNSPEC && hints_ai_family != AF_INET6) {
                 fprintf(stderr, "%s: can't specify both -4 and -6\n", prog);
                 exit(1);
             }