diff --git a/libs/libc/netdb/Kconfig b/libs/libc/netdb/Kconfig index b54ff676a4..5e51ab3b4e 100644 --- a/libs/libc/netdb/Kconfig +++ b/libs/libc/netdb/Kconfig @@ -54,6 +54,13 @@ menuconfig NETDB_DNSCLIENT if NETDB_DNSCLIENT +config NETDB_DNSCLIENT_RECV_TIMEOUT + int "DNS receive tiemout" + default 30 + ---help--- + This the timeout value when DNS receive response after + dns_send_query, unit: seconds + config NETDB_DNSCLIENT_ENTRIES int "Number of DNS resolver entries" default 0 if DEFAULT_SMALL diff --git a/libs/libc/netdb/lib_dnsbind.c b/libs/libc/netdb/lib_dnsbind.c index 3c1645f7a1..d430b2b683 100644 --- a/libs/libc/netdb/lib_dnsbind.c +++ b/libs/libc/netdb/lib_dnsbind.c @@ -107,7 +107,7 @@ int dns_bind(void) /* Set up a receive timeout */ - tv.tv_sec = 30; + tv.tv_sec = CONFIG_NETDB_DNSCLIENT_RECV_TIMEOUT; tv.tv_usec = 0; ret = setsockopt(sd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(struct timeval));