added IPv4 mapped IPv6 addr consideration for getaddrinfo() reverse lookup case
This commit is contained in:
parent
8972cdb14e
commit
3a0c1bfb5d
@ -813,7 +813,10 @@ get_name(addr, afd, res, numaddr, pai, servname)
|
||||
|
||||
hp = getipnodebyaddr(addr, afd->a_addrlen, afd->a_af, &h_error);
|
||||
if (hp && hp->h_name && hp->h_name[0] && hp->h_addr_list[0]) {
|
||||
GET_AI(cur, afd, hp->h_addr_list[0]);
|
||||
if (hp->h_addrtype == afd->a_af)
|
||||
GET_AI(cur, afd, hp->h_addr_list[0]);
|
||||
else /* IPv4 mapped IPv6 addr case */
|
||||
GET_AI(cur, afd, numaddr);
|
||||
GET_PORT(cur, servname);
|
||||
GET_CANONNAME(cur, hp->h_name);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user