mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
esp-netif: ppp netif to use netif_is_link_up() to update interface state
Closes https://github.com/espressif/esp-idf/issues/5069
This commit is contained in:
parent
b72ab0b1f8
commit
2c1bf3ec3b
@ -1121,8 +1121,13 @@ bool esp_netif_is_netif_up(esp_netif_t *esp_netif)
|
||||
{
|
||||
ESP_LOGV(TAG, "%s esp_netif:%p", __func__, esp_netif);
|
||||
|
||||
if (esp_netif != NULL && esp_netif->lwip_netif != NULL && netif_is_up(esp_netif->lwip_netif)) {
|
||||
return true;
|
||||
if (esp_netif != NULL && esp_netif->lwip_netif != NULL) {
|
||||
if (esp_netif->is_ppp_netif) {
|
||||
// ppp implementation uses netif_set_link_up/down to update link state
|
||||
return netif_is_link_up(esp_netif->lwip_netif);
|
||||
}
|
||||
// esp-netif handlers and drivers take care to set_netif_up/down on link state update
|
||||
return netif_is_up(esp_netif->lwip_netif);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user