nslookup: make it more IPv6 friendly

This commit is contained in:
Denis Vlasenko
2006-10-26 17:17:59 +00:00
parent 68f2187265
commit ebe578ab2f
2 changed files with 81 additions and 126 deletions

View File

@@ -329,7 +329,7 @@ static void ping(const char *host)
pingaddr.sin6_family = AF_INET6;
hostent = xgethostbyname2(host, AF_INET6);
if (hostent->h_addrtype != AF_INET6)
bb_error_msg_and_die("unknown address type; only AF_INET6 is currently supported.");
bb_error_msg_and_die("unknown address type; only AF_INET6 is currently supported");
memcpy(&pingaddr.sin6_addr, hostent->h_addr, sizeof(pingaddr.sin6_addr));