From 4b59f7e2c70a9715c035b25c6fc0400bcf9173ce Mon Sep 17 00:00:00 2001 From: David Cermak Date: Tue, 3 Mar 2020 13:55:33 +0100 Subject: [PATCH] mdns: limit the GOT_IP6_EVENT to only known network interfaces --- components/mdns/mdns.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/mdns/mdns.c b/components/mdns/mdns.c index 9bee17076..711de2a45 100644 --- a/components/mdns/mdns.c +++ b/components/mdns/mdns.c @@ -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;