mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-25 01:37:22 +00:00
lwip: DHCP restore last IP
Closes https://github.com/espressif/esp-idf/issues/799
This commit is contained in:

committed by
Ivan Grokhotkov

parent
49125a87bb
commit
2e79baa1db
@@ -44,6 +44,8 @@
|
||||
#include "esp_system.h"
|
||||
#include "sdkconfig.h"
|
||||
|
||||
#include "netif/dhcp_state.h"
|
||||
|
||||
/* Enable all Espressif-only options */
|
||||
|
||||
/*
|
||||
@@ -220,6 +222,19 @@
|
||||
*/
|
||||
#define DHCP_DOES_ARP_CHECK CONFIG_LWIP_DHCP_DOES_ARP_CHECK
|
||||
|
||||
|
||||
/**
|
||||
* CONFIG_LWIP_DHCP_RESTORE_LAST_IP==1: Last valid IP address obtained from DHCP server
|
||||
* is restored after reset/power-up.
|
||||
*/
|
||||
#if CONFIG_LWIP_DHCP_RESTORE_LAST_IP
|
||||
|
||||
#define LWIP_DHCP_IP_ADDR_RESTORE() dhcp_ip_addr_restore(netif)
|
||||
#define LWIP_DHCP_IP_ADDR_STORE() dhcp_ip_addr_store(netif)
|
||||
#define LWIP_DHCP_IP_ADDR_ERASE() dhcp_ip_addr_erase(esp_netif[tcpip_if])
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
------------------------------------
|
||||
---------- AUTOIP options ----------
|
||||
|
Reference in New Issue
Block a user