- Fix problem when socket fd is 0 (#125, thanks Ramón Novoa!)
- Fix running on servers with disabled IPv6 (#118, thanks Simon Matter)
+- Allow running "fping -h" or "--help" even when raw socket can't be opened (#131, thanks @teto)
fping 4.0 (2017-04-23)
======================
HOST_ENTRY* cursor;
struct optparse optparse_state;
+ /* pre-parse -h/--help, so that we also can output help information
+ * without trying to open the socket, which might fail */
+ if(argc == 2 && ( strcmp(argv[1],"-h")==0 || strcmp(argv[1],"--help")==0 )) {
+ usage(0);
+ }
+
socket4 = open_ping_socket_ipv4(ping_data_size);
#ifdef IPV6
socket6 = open_ping_socket_ipv6(ping_data_size);