More for fixing MDNS
After @hreintke 's fix (#8641 from #8308), this notice and these lwIP guidelines brought to attention by @mcspr,
our mDNS implementation will benefit from part or all these suggestions:
- ATTENTION: netif_set_up() now always has to be called, even when dhcp/autoip is used!
LwipIntf::stateUpCB()should trigger also when IP address change
LwipIntf::stateUpCB()
s/LwipIntf::stateUpCB()/LwipIntf::ipChangeCB()/ ? in case of DHCP, that would be called twice
Might be confusing for static ip? Need to check examples, though. Is it 'STATE UP -> set ip addresses' or 'set ip addresses -> STATE UP'? In the referenced issue that was 'solved' by optional EXT callbacks feature within LWIP core, I don't see any callbacks in dhcp client. Same for auto-ip :/
We can also considerate bringing interface DOWN then UP when IP changes
Also seems weird :/ Can we replace netif_status_changed with netif->status_callback?
https://github.com/lwip-tcpip/lwip/blob/239918ccc173cb2c2a62f41a40fd893f57faf1d6/src/core/netif.c#L350-L352
https://github.com/lwip-tcpip/lwip/blob/239918ccc173cb2c2a62f41a40fd893f57faf1d6/src/core/netif.c#L504 (called on IP change)
https://github.com/lwip-tcpip/lwip/blob/239918ccc173cb2c2a62f41a40fd893f57faf1d6/src/core/netif.c#L882 (called on UP / DOWN)