From faf23c095cb94cc1179ba3ddd9d2affa8ae7e821 Mon Sep 17 00:00:00 2001 From: Alex Winter Date: Tue, 14 May 2019 02:30:32 +0300 Subject: [PATCH] Fixed rare crash of DHCP Server during WIFI AP network reconfiguration and DHCP restart due to missed callback Signed-off-by: xueyunfei --- components/tcpip_adapter/tcpip_adapter_lwip.c | 1 + 1 file changed, 1 insertion(+) diff --git a/components/tcpip_adapter/tcpip_adapter_lwip.c b/components/tcpip_adapter/tcpip_adapter_lwip.c index 443fa54bb..c0c84ce7a 100644 --- a/components/tcpip_adapter/tcpip_adapter_lwip.c +++ b/components/tcpip_adapter/tcpip_adapter_lwip.c @@ -808,6 +808,7 @@ esp_err_t tcpip_adapter_dhcps_start(tcpip_adapter_if_t tcpip_if) if (p_netif != NULL && netif_is_up(p_netif)) { tcpip_adapter_ip_info_t default_ip; tcpip_adapter_get_ip_info(ESP_IF_WIFI_AP, &default_ip); + dhcps_set_new_lease_cb(tcpip_adapter_dhcps_cb); dhcps_start(p_netif, default_ip.ip); dhcps_status = TCPIP_ADAPTER_DHCP_STARTED; ESP_LOGD(TAG, "dhcp server start successfully");