mdns: limit the GOT_IP6_EVENT to only known network interfaces

This commit is contained in:
David Cermak 2020-03-03 13:55:33 +01:00
parent 716298f8e3
commit 4b59f7e2c7

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;