From e80c473830792fca1fef4ca263da0df9ac06f0e9 Mon Sep 17 00:00:00 2001 From: "Martine S. Lenders" Date: Wed, 24 Jun 2020 16:32:47 +0200 Subject: [PATCH] pkg/lwip: only use ip4_addr_t component of IP4_ADDR_ANY at bootstrap IP4_ADDR_ANY is a generic address of type IPv4 when lwIP is compiled with both IPv4 and IPv6, so we need to extract the `ip4_addr_t` component when using with `netif_add()` as that is the expected type. --- pkg/lwip/contrib/lwip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/lwip/contrib/lwip.c b/pkg/lwip/contrib/lwip.c index 51282e2729..c9421bfe70 100644 --- a/pkg/lwip/contrib/lwip.c +++ b/pkg/lwip/contrib/lwip.c @@ -155,8 +155,8 @@ static struct netif *_netif_add(struct netif *netif, void *state, netif_init_fn init, netif_input_fn input) { #if IS_USED(MODULE_LWIP_IPV4) - return netif_add(netif, IP4_ADDR_ANY, IP4_ADDR_ANY, IP4_ADDR_ANY, - state, init, input); + return netif_add(netif, ip_2_ip4(IP4_ADDR_ANY), ip_2_ip4(IP4_ADDR_ANY), + ip_2_ip4(IP4_ADDR_ANY), state, init, input); #else /* IS_USED(MODULE_LWIP_IPV4) */ return netif_add(netif, state, init, input); #endif /* IS_USED(MODULE_LWIP_IPV4) */