Skip to main content
Associate II
July 29, 2025
Solved

NetxDuo mDNS and DHCP conflict because of ST Ethernet driver

  • July 29, 2025
  • 6 replies
  • 378 views

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(&eth_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?

 

Best answer by STackPointer64

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.

STackPointer64_0-1776185774188.png

Best regards,

6 replies

Technical Moderator
August 11, 2025

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,

To improve visibility of answered topics, please click 'Accept as Solution' on the reply that resolved your issue or answered your question.
sssoooAuthor
Associate II
August 18, 2025

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

Associate III
April 9, 2026

@sssooo I seem to have the exact issue and solution to this problem. Is this solution working fine for you ?

sssoooAuthor
Associate II
April 9, 2026

Yes, it works.

But I can not guarantee that it is 100% correct solution.

Unfortunately there was no help from ST for me.

Technical Moderator
April 10, 2026

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,

To improve visibility of answered topics, please click 'Accept as Solution' on the reply that resolved your issue or answered your question.
STackPointer64Best answer
Technical Moderator
April 14, 2026

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.

STackPointer64_0-1776185774188.png

Best regards,

To improve visibility of answered topics, please click 'Accept as Solution' on the reply that resolved your issue or answered your question.