diff --git a/arch/sim/src/sim/sim_netdriver.c b/arch/sim/src/sim/sim_netdriver.c index a4aa586bd4..e7d414d858 100644 --- a/arch/sim/src/sim/sim_netdriver.c +++ b/arch/sim/src/sim/sim_netdriver.c @@ -281,7 +281,11 @@ static int netdriver_ifup(struct net_driver_s *dev) int devidx = (intptr_t)dev->d_private; UNUSED(devidx); +#ifdef CONFIG_NET_IPv4 sim_netdev_ifup(devidx, dev->d_ipaddr); +#else /* CONFIG_NET_IPv6 */ + sim_netdev_ifup(devidx, INADDR_ANY); +#endif /* CONFIG_NET_IPv4 */ netdev_carrier_on(dev); return OK; }