fix issue 6150 by always setting net interface UP in mbed_set_dhcp

pull/6160/head
Teemu Kultala 2018-02-22 10:54:36 +02:00
parent c32b822bb2
commit 34ef11630c
2 changed files with 4 additions and 3 deletions

View File

@ -444,9 +444,7 @@ static bool lwip_ppp = false;
static nsapi_error_t mbed_set_dhcp(struct netif *lwip_netif)
{
if (!lwip_ppp) {
netif_set_up(lwip_netif);
}
netif_set_up(lwip_netif);
#if LWIP_DHCP
if (lwip_dhcp && lwip_dhcp_has_to_be_set) {

View File

@ -702,6 +702,9 @@ nsapi_error_t PPPCellularInterface::connect()
* mbed_ppp_init() is a blocking call, it will block until
* connected, or timeout after 30 seconds*/
retcode = nsapi_ppp_connect(_fh, callback(this, &PPPCellularInterface::ppp_status_cb), _uname, _pwd, _stack);
if (retcode == NSAPI_ERROR_OK && _connect_is_blocking) {
_connect_status = NSAPI_STATUS_GLOBAL_UP;
}
} while ((_connect_status == NSAPI_STATUS_CONNECTING && _connect_is_blocking) &&
apn_config && *apn_config);