diff --git a/subsys/net/lib/config/init.c b/subsys/net/lib/config/init.c index 1748be7ae9a..d7d2a0b389e 100644 --- a/subsys/net/lib/config/init.c +++ b/subsys/net/lib/config/init.c @@ -376,6 +376,14 @@ int net_config_init(const char *app_info, u32_t flags, s32_t timeout) #endif } + if (count == 0) { + /* Network interface did not come up. We will not try + * to setup things in that case. + */ + NET_ERR("Timeout while waiting network %s", "interface"); + return -ENETDOWN; + } + if (flags & NET_CONFIG_NEED_IPV6) { need++; } @@ -402,7 +410,7 @@ int net_config_init(const char *app_info, u32_t flags, s32_t timeout) } if (!count && timeout) { - NET_ERR("Timeout while waiting setup"); + NET_ERR("Timeout while waiting network %s", "setup"); return -ETIMEDOUT; }