From f66616556db608d8ca89889340283c532d5c4da0 Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 12 Sep 2019 18:08:50 +1000 Subject: [PATCH] stm32/lwip_inc: Enable LWIP_NETIF_EXT_STATUS_CALLBACK for mDNS. This feature makes sure that mDNS is automatically restarted when there is any change event on a netif. --- ports/stm32/lwip_inc/lwipopts.h | 1 + ports/stm32/modnetwork.c | 7 ------- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/ports/stm32/lwip_inc/lwipopts.h b/ports/stm32/lwip_inc/lwipopts.h index 4ad1ae0083..7b2460fa80 100644 --- a/ports/stm32/lwip_inc/lwipopts.h +++ b/ports/stm32/lwip_inc/lwipopts.h @@ -22,6 +22,7 @@ #define LWIP_SOCKET 0 #define LWIP_STATS 0 #define LWIP_NETIF_HOSTNAME 1 +#define LWIP_NETIF_EXT_STATUS_CALLBACK 1 #define LWIP_IPV6 0 #define LWIP_DHCP 1 diff --git a/ports/stm32/modnetwork.c b/ports/stm32/modnetwork.c index 80e5a5a162..13ecf444f0 100644 --- a/ports/stm32/modnetwork.c +++ b/ports/stm32/modnetwork.c @@ -189,10 +189,6 @@ mp_obj_t mod_network_nic_ifconfig(struct netif *netif, size_t n_args, const mp_o mp_hal_delay_ms(100); } - #if LWIP_MDNS_RESPONDER - mdns_resp_netif_settings_changed(netif); - #endif - return mp_const_none; } else { // Release and stop any existing DHCP @@ -207,9 +203,6 @@ mp_obj_t mod_network_nic_ifconfig(struct netif *netif, size_t n_args, const mp_o ip_addr_t dns; netutils_parse_ipv4_addr(items[3], (uint8_t*)&dns, NETUTILS_BIG); dns_setserver(0, &dns); - #if LWIP_MDNS_RESPONDER - mdns_resp_netif_settings_changed(netif); - #endif return mp_const_none; } }