mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-29 18:27:31 +02:00
mdns: fixed crashes on network changes
1) two events AP_STOP, AP_START shortly after each other may cause IGMP config on already stopped netif 2) not properly locked sending packets to queue from timer task closes #2580 * Original commit: espressif/esp-idf@097282a8e3
This commit is contained in:
committed by
suren-gabrielyan-espressif
parent
ea2300753e
commit
9b3b41c3f1
@ -62,6 +62,12 @@ static esp_err_t _udp_join_group(tcpip_adapter_if_t tcpip_if, mdns_ip_protocol_t
|
||||
{
|
||||
struct netif * netif = NULL;
|
||||
void * nif = NULL;
|
||||
|
||||
if (!tcpip_adapter_is_netif_up(tcpip_if)) {
|
||||
// Network interface went down before event propagated, skipping IGMP config
|
||||
return ESP_ERR_INVALID_STATE;
|
||||
}
|
||||
|
||||
esp_err_t err = tcpip_adapter_get_netif(tcpip_if, &nif);
|
||||
if (err) {
|
||||
return ESP_ERR_INVALID_ARG;
|
||||
|
Reference in New Issue
Block a user