(hosts_keys): Pass INADDRSZ as size rather than IN6ADDRSZ to AF_INET gethostbyaddr.

This commit is contained in:
Ulrich Drepper 2005-10-08 17:28:41 +00:00
parent 869e83f2f9
commit 4f3d6536ce
1 changed files with 2 additions and 2 deletions

View File

@ -280,9 +280,9 @@ hosts_keys (int number, char *key[])
char addr[IN6ADDRSZ];
if (inet_pton (AF_INET6, key[i], &addr) > 0)
host = gethostbyaddr (addr, sizeof (addr), AF_INET6);
host = gethostbyaddr (addr, IN6ADDRSZ, AF_INET6);
else if (inet_pton (AF_INET, key[i], &addr) > 0)
host = gethostbyaddr (addr, sizeof (addr), AF_INET);
host = gethostbyaddr (addr, INADDRSZ, AF_INET);
else if ((host = gethostbyname2 (key[i], AF_INET6)) == NULL)
host = gethostbyname2 (key[i], AF_INET);