cancel
Showing results for 
Search instead for 
Did you mean: 

NetxDuo mDNS and DHCP conflict because of ST Ethernet driver

sssooo
Associate

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?

 

0 REPLIES 0