Skip to content

Commit

Permalink
Add backward compatibility for fping6 sym-link
Browse files Browse the repository at this point in the history
  • Loading branch information
abelbeck committed Oct 20, 2018
1 parent 180c6dd commit a82f40f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/fping.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,11 @@ int main(int argc, char** argv)
socket4 = open_ping_socket_ipv4(ping_data_size);
#ifdef IPV6
socket6 = open_ping_socket_ipv6(ping_data_size);
/* if called (sym-linked) via 'fping6', imply '-6'
* for backward compatibility */
if (strstr(prog, "fping6")) {
hints_ai_family = AF_INET6;
}
#endif

if ((uid = getuid())) {
Expand Down

0 comments on commit a82f40f

Please sign in to comment.