Return HOSTNAME_INVALIDADDR when reverse lookup is fail.
Submitted by: Sergey Zorin <sergey@cc.tpu.edu.ru>
This commit is contained in:
parent
2c71c8bcd1
commit
794c69e143
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user