2025-07-29 1:54 AM - last edited on 2025-08-01 7:21 AM by Saket_Om
Hi all,
I've noticed that a DHCP client can not get an IP address from the server if both mDNS server and DHCP client are enabled.
The reason seems to be in ST Ethernet driver (nx_stm32_eth_driver.c):
static UINT _nx_driver_hardware_initialize(NX_IP_DRIVER *driver_req_ptr)
{
...
FilterConfig.BroadcastFilter = ENABLE;
...
}
static UINT _nx_driver_hardware_multicast_join(NX_IP_DRIVER *driver_req_ptr)
{
/* Increase the multicast count. */
nx_driver_information.nx_driver_information_multicast_count++;
/* Enable multicast frame reception. */
FilterConfig.PassAllMulticast = ENABLE;
HAL_ETH_SetMACFilterConfig(ð_handle, &FilterConfig);
/* Return success. */
return(NX_SUCCESS);
}
In _nx_driver_hardware_initialize() FilterConfig is just prepared, there is no HAL_ETH_SetMACFilterConfig() call.
That's why DHCP works OK if mDNS is not used.
If mDNS is active, it calls _nx_driver_hardware_multicast_join() and applies a prepared FilterConfig where BroadcastFilter is ENABLED.
This blocks DHCP work.
Fix seems to be: set BroadcastFilter to DISABLE in _nx_driver_hardware_initialize()
Is such a fix correct?
Solved! Go to Solution.
2026-04-14 9:57 AM
Hello @sssooo,
I just received confirmation from the development team. There was an API change in HAL_ETH_SetMACFilterConfig() in the ETH_MACFilterConfigTypeDef structure for the BroadcastFilter field.
With the new version, the BroadcastFilter field must be set to DISABLE to allow reception of broadcast packets. This is a valid fix, not a workaround.
Best regards,
2025-08-11 8:14 AM - edited 2025-08-12 2:24 AM
Hello @sssooo, and welcome to ST Community!
Could you please provide a minimal version of the project that reproduces this issue? This will help us analyze the problem more efficiently. Thank you!
Best regards,
2025-08-18 6:49 AM
Hello,
please see attached project for NUCLEO-H563ZI.
If you will try the project as is, DHCP and mDNS works ok.
This is because I've manually set BroadcastFilter to DISABLE in _nx_driver_hardware_initialize().
You can try to change it to ENABLE and DHCP will not work (it will not receive a broadcast packet from DHCP server).
Please notice that nx_mdns_create() and nx_mdns_enable() are called before nx_dhcp_start().
This is done intentionally for fast DHCP fail demonstration (with BroadcastFilter = ENABLE).
If mDNS starts after DHCP at first look all works ok together, but after a few hours DHCP will try to extend IP lease time but without success because of BroadcastFilter activated by mDNS.
Regards
2026-04-09 5:54 AM
@sssooo I seem to have the exact issue and solution to this problem. Is this solution working fine for you ?
2026-04-09 6:15 AM
Yes, it works.
But I can not guarantee that it is 100% correct solution.
Unfortunately there was no help from ST for me.
2026-04-10 10:11 AM
Hello,
I have escalated the issue to the relevant team for resolution, as it is unusual behavior and should not happen. It is being tracked internally under ticket number CDM0061604.
Best regards,
2026-04-14 9:57 AM
Hello @sssooo,
I just received confirmation from the development team. There was an API change in HAL_ETH_SetMACFilterConfig() in the ETH_MACFilterConfigTypeDef structure for the BroadcastFilter field.
With the new version, the BroadcastFilter field must be set to DISABLE to allow reception of broadcast packets. This is a valid fix, not a workaround.
Best regards,