From 1de11efadd0083469f26c8782be3d55073829767 Mon Sep 17 00:00:00 2001 From: Christoph Baechler Date: Mon, 6 Nov 2023 10:50:33 +0100 Subject: [PATCH] dns: fix init with only ipv4 enabled --- src/core/dns.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/dns.c b/src/core/dns.c index bd02aa832..29b3b1733 100644 --- a/src/core/dns.c +++ b/src/core/dns.c @@ -325,7 +325,9 @@ dns_init(void) /* initialize fallback dns DNS server address */ ip_addr_t dnsserver; FALLBACK_DNS_SERVER_ADDRESS(&dnsserver); +#if LWIP_IPV4 && LWIP_IPV6 dnsserver.type = IPADDR_TYPE_V4; +#endif dns_setserver(DNS_FALLBACK_SERVER_INDEX, &dnsserver); #endif /* FALLBACK_DNS_SERVER_ADDRESS */