mdns: limit the GOT_IP6_EVENT to only known network interfaces

* Original commit: espressif/esp-idf@ab8cab1c55
This commit is contained in:
David Cermak
2020-03-03 13:55:33 +01:00
committed by suren-gabrielyan-espressif
parent 7bf23a7fe9
commit 2b7d43e1f8

View File

@ -3176,8 +3176,10 @@ static void _mdns_handle_system_event(esp_event_base_t event_base,
case IP_EVENT_GOT_IP6:
{
mdns_if_t mdns_if = _mdns_get_if_from_esp_netif(interface);
_mdns_enable_pcb(mdns_if, MDNS_IP_PROTOCOL_V6);
_mdns_announce_pcb(mdns_if, MDNS_IP_PROTOCOL_V4, NULL, 0, true);
if (mdns_if != MDNS_IF_MAX) {
_mdns_enable_pcb(mdns_if, MDNS_IP_PROTOCOL_V6);
_mdns_announce_pcb(mdns_if, MDNS_IP_PROTOCOL_V4, NULL, 0, true);
}
}
break;