mirror of
https://github.com/espressif/esp-lwip.git
synced 2026-10-04 14:57:37 +00:00
netdb:fixed bug for getaddrinfo returns null when IPV4 mapped address
This commit is contained in:
@@ -361,6 +361,7 @@ lwip_getaddrinfo(const char *nodename, const char *servname,
|
|||||||
&& IP_GET_TYPE(&addr) == IPADDR_TYPE_V4) {
|
&& IP_GET_TYPE(&addr) == IPADDR_TYPE_V4) {
|
||||||
/* Convert native V4 address to a V4-mapped IPV6 address */
|
/* Convert native V4 address to a V4-mapped IPV6 address */
|
||||||
ip4_2_ipv4_mapped_ipv6(ip_2_ip6(&addr), ip_2_ip4(&addr));
|
ip4_2_ipv4_mapped_ipv6(ip_2_ip6(&addr), ip_2_ip4(&addr));
|
||||||
|
IP_SET_TYPE_VAL(addr, IPADDR_TYPE_V6);
|
||||||
}
|
}
|
||||||
#endif /* ESP_LWIP && LWIP_IPV4 && LWIP_IPV6 */
|
#endif /* ESP_LWIP && LWIP_IPV4 && LWIP_IPV6 */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user