Merge branch 'bugfix/backport_some_lwip_bugs_0327_v3.2' into 'release/v3.2'
lw-ip:backport some lw-ip bugfix 0327 for v3.2 See merge request espressif/esp-idf!8133
This commit is contained in:
commit
db38a4e068
3 changed files with 17 additions and 2 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 39f338547ab344e855f94eb922421036bee8e417
|
||||
Subproject commit da2740fa8d56b9b9e8a10602f38df1ea4dbd9b74
|
|
@ -655,6 +655,13 @@
|
|||
*/
|
||||
#define LWIP_IPV6 1
|
||||
|
||||
/**
|
||||
* LWIP_ND6_RDNSS_MAX_DNS_SERVERS: Allow IPv6 DNS servers to be retrieved from
|
||||
* NDP, up to the maximum number of allowed DNS servers (minus fallback slot)
|
||||
*/
|
||||
#define LWIP_ND6_RDNSS_MAX_DNS_SERVERS 0
|
||||
|
||||
|
||||
/*
|
||||
---------------------------------------
|
||||
---------- Hook options ---------------
|
||||
|
|
|
@ -323,6 +323,9 @@ esp_err_t tcpip_adapter_down(tcpip_adapter_if_t tcpip_if)
|
|||
tcpip_adapter_reset_ip_info(tcpip_if);
|
||||
}
|
||||
|
||||
for(int8_t i = 0 ;i < LWIP_IPV6_NUM_ADDRESSES ;i++) {
|
||||
netif_ip6_addr_set(esp_netif[tcpip_if] ,i ,IP6_ADDR_ANY6);
|
||||
}
|
||||
netif_set_addr(esp_netif[tcpip_if], IP4_ADDR_ANY4, IP4_ADDR_ANY4, IP4_ADDR_ANY4);
|
||||
netif_set_down(esp_netif[tcpip_if]);
|
||||
tcpip_adapter_start_ip_lost_timer(tcpip_if);
|
||||
|
@ -771,6 +774,7 @@ esp_err_t tcpip_adapter_get_dns_info(tcpip_adapter_if_t tcpip_if, tcpip_adapter_
|
|||
|
||||
dns_param.dns_type = type;
|
||||
dns_param.dns_info = dns;
|
||||
const ip_addr_t* dns_ip = NULL;
|
||||
|
||||
TCPIP_ADAPTER_IPC_CALL(tcpip_if, type, 0, &dns_param, tcpip_adapter_get_dns_info_api);
|
||||
if (!dns) {
|
||||
|
@ -789,7 +793,10 @@ esp_err_t tcpip_adapter_get_dns_info(tcpip_adapter_if_t tcpip_if, tcpip_adapter_
|
|||
}
|
||||
|
||||
if (tcpip_if == TCPIP_ADAPTER_IF_STA || tcpip_if == TCPIP_ADAPTER_IF_ETH) {
|
||||
dns->ip = dns_getserver(type);
|
||||
dns_ip = dns_getserver(type);
|
||||
if (dns_ip != NULL) {
|
||||
dns->ip = *dns_ip;
|
||||
}
|
||||
} else {
|
||||
dns->ip.u_addr.ip4 = dhcps_dns_getserver();
|
||||
}
|
||||
|
@ -827,6 +834,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");
|
||||
|
|
Loading…
Reference in a new issue