forked from espressif/esp-idf
Merge branch 'fix/netif_ppp_dhcp' into 'master'
fix(esp_netif): Fix incorrect DHCP call for PPP interfaces Closes IDFGH-15097 See merge request espressif/esp-idf!38403
This commit is contained in:
@@ -1455,7 +1455,14 @@ static void esp_netif_internal_dhcpc_cb(struct netif *netif)
|
|||||||
ESP_LOGE(TAG, "dhcpc cb: failed to post got ip event (%x)", ret);
|
ESP_LOGE(TAG, "dhcpc cb: failed to post got ip event (%x)", ret);
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_LWIP_DHCP_RESTORE_LAST_IP
|
#ifdef CONFIG_LWIP_DHCP_RESTORE_LAST_IP
|
||||||
|
/*
|
||||||
|
* Store the IP address only for non-Point-to-Point interfaces.
|
||||||
|
* P2P interfaces (like PPP) have dynamic addressing that shouldn't be stored
|
||||||
|
* for later restoration, as they're negotiated on each connection.
|
||||||
|
*/
|
||||||
|
if (!_IS_NETIF_ANY_POINT2POINT_TYPE(esp_netif)) {
|
||||||
dhcp_ip_addr_store(netif);
|
dhcp_ip_addr_store(netif);
|
||||||
|
}
|
||||||
#endif /* CONFIG_LWIP_DHCP_RESTORE_LAST_IP */
|
#endif /* CONFIG_LWIP_DHCP_RESTORE_LAST_IP */
|
||||||
} else {
|
} else {
|
||||||
ESP_LOGD(TAG, "if%p ip unchanged", esp_netif);
|
ESP_LOGD(TAG, "if%p ip unchanged", esp_netif);
|
||||||
|
Reference in New Issue
Block a user