Skip to content

Commit

Permalink
netdb: Fix getaddrinfo() bug returning NULL on IP4 mapped address
Browse files Browse the repository at this point in the history
2.1.3-esp: dafc822 netdb:fixed bug for getaddrinfo returns null when IPV4 mapped address
  • Loading branch information
freakyxue authored and david-cermak committed Sep 11, 2024
1 parent a1a9b03 commit 3a92418
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/api/netdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ lwip_getaddrinfo(const char *nodename, const char *servname,
&& IP_GET_TYPE(&addr) == IPADDR_TYPE_V4) {
/* Convert native V4 address to a V4-mapped IPV6 address */
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 */

Expand Down

0 comments on commit 3a92418

Please sign in to comment.