Return HOSTNAME_INVALIDADDR when reverse lookup is fail.

Submitted by:	Sergey Zorin <sergey@cc.tpu.edu.ru>
This commit is contained in:
ume 2002-06-07 17:25:19 +00:00
parent 2c71c8bcd1
commit 794c69e143

View File

@ -119,7 +119,7 @@ realhostname_sa(char *host, size_t hsize, struct sockaddr *addr, int addrlen)
#endif
error = getnameinfo(addr, addrlen, buf, sizeof(buf), NULL, 0,
NI_WITHSCOPEID);
NI_WITHSCOPEID | NI_NAMEREQD);
if (error == 0) {
struct addrinfo hints, *res, *ores;
struct sockaddr *sa;