From 65706be451a43ab31fcdd04309583f747834ed0b Mon Sep 17 00:00:00 2001 From: Abhik Roy Date: Thu, 23 Jan 2025 21:04:22 +1100 Subject: [PATCH 1/2] fix(lwip): Fixed compilation issue with LWIP_DHCP_RESTORE_LAST_IP Closes https://github.com/espressif/esp-idf/issues/14582 --- components/lwip/port/include/lwipopts.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/lwip/port/include/lwipopts.h b/components/lwip/port/include/lwipopts.h index 4eb38acea8..3a7671472d 100644 --- a/components/lwip/port/include/lwipopts.h +++ b/components/lwip/port/include/lwipopts.h @@ -362,7 +362,7 @@ extern "C" { */ #define LWIP_HOOK_DHCP_POST_INIT(netif, result) \ (dhcp_ip_addr_restore(netif) ? ( dhcp_set_state(dhcp, DHCP_STATE_BOUND), \ - dhcp_network_changed(netif), \ + dhcp_network_changed_link_up(netif), \ (result) = ERR_OK , \ true ) : \ false) From ebef063523cff94b6cdfe91662b8ab8dbcd5e6b0 Mon Sep 17 00:00:00 2001 From: Abhik Roy Date: Thu, 23 Jan 2025 21:20:05 +1100 Subject: [PATCH 2/2] test(lwip): Added LWIP_DHCP_RESTORE_LAST_IP config in lwip test apps Enabled CONFIG_LWIP_DHCP_RESTORE_LAST_IP configuration to compile and test the DHCP last IP restore functionality in CI tests. --- components/lwip/test_apps/main/CMakeLists.txt | 2 +- components/lwip/test_apps/sdkconfig.defaults | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/components/lwip/test_apps/main/CMakeLists.txt b/components/lwip/test_apps/main/CMakeLists.txt index bfd19d1277..012a9ca9e3 100644 --- a/components/lwip/test_apps/main/CMakeLists.txt +++ b/components/lwip/test_apps/main/CMakeLists.txt @@ -1,4 +1,4 @@ idf_component_register(SRCS "lwip_test.c" REQUIRES test_utils INCLUDE_DIRS "." - PRIV_REQUIRES unity lwip test_utils) + PRIV_REQUIRES unity lwip test_utils nvs_flash) diff --git a/components/lwip/test_apps/sdkconfig.defaults b/components/lwip/test_apps/sdkconfig.defaults index 168e08d4cd..de762f8fe1 100644 --- a/components/lwip/test_apps/sdkconfig.defaults +++ b/components/lwip/test_apps/sdkconfig.defaults @@ -1,2 +1,5 @@ CONFIG_UNITY_ENABLE_FIXTURE=y CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=n + +# Added to enable compilation of DHCP last IP restore feature +CONFIG_LWIP_DHCP_RESTORE_LAST_IP=y