net: dns: resolver: No need to double the socket count

The socket allocation count was incorrectly calculated as
we have only one socket per DNS server.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This commit is contained in:
Jukka Rissanen 2024-05-23 17:04:27 +03:00 committed by Carles Cufí
parent 631c0a3aab
commit ee6805d3e0

View file

@ -193,11 +193,7 @@ struct dns_resolve_context {
} servers[CONFIG_DNS_RESOLVER_MAX_SERVERS + DNS_MAX_MCAST_SERVERS];
/** @cond INTERNAL_HIDDEN */
#if (IS_ENABLED(CONFIG_NET_IPV6) && IS_ENABLED(CONFIG_NET_IPV4))
#define DNS_RESOLVER_MAX_POLL (2 * (CONFIG_DNS_RESOLVER_MAX_SERVERS + DNS_MAX_MCAST_SERVERS))
#else
#define DNS_RESOLVER_MAX_POLL (1 * (CONFIG_DNS_RESOLVER_MAX_SERVERS + DNS_MAX_MCAST_SERVERS))
#endif
#define DNS_RESOLVER_MAX_POLL (CONFIG_DNS_RESOLVER_MAX_SERVERS + DNS_MAX_MCAST_SERVERS)
/** Socket polling for each server connection */
struct zsock_pollfd fds[DNS_RESOLVER_MAX_POLL];
/** @endcond */