spine
spine copied to clipboard
IPv6 ping only blindly marks host Down
In all repo branch versions of ping.c code, IPv6 hosts as marked down in the } else if (host->availability_method == AVAIL_PING) {
block.
if (!strstr(host->hostname, "localhost")) {
if (get_address_type(host) == 1) {
if (host->ping_method == PING_ICMP) {
ping_result = ping_icmp(host, ping);
} else if (host->ping_method == PING_UDP) {
ping_result = ping_udp(host, ping);
} else if (host->ping_method == PING_TCP) {
ping_result = ping_tcp(host, ping);
}
} else if (host->availability_method == AVAIL_PING) {
snprintf(ping->ping_status, 50, "0.000");
snprintf(ping->ping_response, SMALL_BUFSIZE, "PING: Device is Unknown or is IPV6. Please use the SNMP ping options only.");
return HOST_DOWN;
}
It is expected that IPv6 hosts are treated as well as IPv4 hosts and provide a true ping result on both Linux and Windows OS.