1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-13 13:01:55 +03:00

lwIP: v2.1.3 + dhcp fixes (#8319)

* lwIP: v2.1.3
* interface set as default when gw is valid
This commit is contained in:
david gauchard
2022-01-06 12:38:36 +01:00
committed by GitHub
parent a05a71fa9d
commit 4c07113ff5
21 changed files with 109 additions and 31 deletions

View File

@ -66,6 +66,7 @@ public:
void setDefault();
// true if interface has a valid IPv4 address
bool connected()
{
return !!ip4_addr_get_u32(ip_2_ip4(&_netif.ip_addr));
@ -305,8 +306,10 @@ void LwipIntfDev<RawDev>::netif_status_callback()
{
if (connected())
{
if (_default)
if (_default || (netif_default == nullptr && !ip_addr_isany(&_netif.gw)))
{
// on user request,
// or if there is no current default interface, but a gateway is valid
netif_set_default(&_netif);
}
sntp_stop();