libc/netdb: Separate IPv4 and IPv6 cache size limit

Some domains have a lot of IPv6 addresses. Because of that, it is
not possible to get the IPv4 address with getaddrinfo.

This change separate IPv4 and IPv6 cache size limit to enable to
get both IP addresses.
This commit is contained in:
SPRESENSE
2021-08-26 17:07:41 +09:00
committed by Petro Karashchenko
parent 63ed723d93
commit d1c7e1816f
9 changed files with 33 additions and 13 deletions
+19 -4
View File
@@ -33,15 +33,30 @@ config NETDB_BUFSIZE
depends on LIBC_NETDB
default 256
config NETDB_MAX_IPADDR
int "Max number of IP addresses per host"
if NET_IPv4
config NETDB_MAX_IPv4ADDR
int "Max number of IPv4 addresses per host"
depends on LIBC_NETDB
default 2 if NET_IPv4 && NET_IPv6
default 1
---help---
This setting determines the maximum number of IP addresses
This setting determines the maximum number of IPv4 addresses
stored to the name resolution cache for a given host.
endif # NET_IPv4
if NET_IPv6
config NETDB_MAX_IPv6ADDR
int "Max number of IPv6 addresses per host"
depends on LIBC_NETDB
default 1
---help---
This setting determines the maximum number of IPv6 addresses
stored to the name resolution cache for a given host.
endif # NET_IPv6
menuconfig NETDB_HOSTFILE
bool "Network host file support"
default n