calling esp_netif_up() and esp_netif_down() was not supported if the
underlying netif wos of ppp type. Updated the code to enable setting
these interfaces up/down and registered actions in moden_netif glue for
connection/disconnection events to set the netif up/down.
On update of any interface (set up/down) a routing preference is updated calling esp_netif_update_default_netif() that is called from
lwip context. But if the related netif was ppp type, the set_default api used user-mode, thus causing a dead lock.
Closes https://github.com/espressif/esp-idf/issues/4746
The ppp_set_auth() is guard by #if PPP_AUTH_SUPPORT in lwIP, so
make it consistent. This also simplify the code a bit because the code
in #if PAP_SUPPORT guard and #if CHAP_SUPPORT guard are exactly the same.
Once NETIF_PPP_AUTHTYPE_NONE added to esp_netif_auth_type_t, it also allows
setting NETIF_PPP_AUTHTYPE_NONE with this change.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Merges https://github.com/espressif/esp-idf/pull/4639