summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2019-09-12 18:08:50 +1000
committerDamien George <damien.p.george@gmail.com>2019-09-12 18:08:50 +1000
commitf66616556db608d8ca89889340283c532d5c4da0 (patch)
tree88f3147d6edcf3762c256af38ba2bc0ba56c86bb
parentb0e17bbb9d804b04a566b809c19acd5128f972e5 (diff)
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.
-rw-r--r--ports/stm32/lwip_inc/lwipopts.h1
-rw-r--r--ports/stm32/modnetwork.c7
2 files changed, 1 insertions, 7 deletions
diff --git a/ports/stm32/lwip_inc/lwipopts.h b/ports/stm32/lwip_inc/lwipopts.h
index 4ad1ae008..7b2460fa8 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 80e5a5a16..13ecf444f 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;
}
}