UNRELEASED
- * INCOMPATIBLE CHANGE: when a name with multiple IPs is provided, fping will
- now ping all addresses (instead of just the first one)
* Use sockaddr_storage and simplify code, so that we can one day
support both IPv4 and IPv6 with the same binary
* Fix double entries with fping -u and unreachable hosts
num_noaddress++;
return;
}
- for (res = res0; res; res = res->ai_next) {
+
+ // NOTE: we could/should loop with res on all addresses like this:
+ // for (res = res0; res; res = res->ai_next) {
+ // We don't do it yet, however, because is is an incompatible change
+ // (need to implement a separate option for this)
+
+ for (res = res0; res; res = 0) {
len = res->ai_addrlen;
/* name_flag: addr -> name lookup requested) */
if(!name_flag) {
else {
add_addr(name, printname, res->ai_addr, res->ai_addrlen);
}
+
+ return;
}
} /* add_name() */