connectedhomeip icon indicating copy to clipboard operation
connectedhomeip copied to clipboard

Allow IsCurrentInterfaceUsable platform override for MinimalMdns

Open s-mcclain opened this issue 2 years ago • 1 comments

Problem

MinimalMdnsServer.h defines it's own function, IsCurrentInterfaceUsable() for indicating which interfaces on the device should be used for broadcasting mdns queries/responses. This function simply returns true unless it contains lo. I'm sure there's several platforms which contain interfaces outside of lo which we would like to have disabled, but there's currently no way to configure which platforms to enable/disable.

Proposed Solution

Allow for platforms to be able to either:

  • Override the function IsCurrentInterfaceUsable() OR
  • Allow for platform to be able to specific which platforms they wish to have enabled.

s-mcclain avatar Aug 08 '22 14:08 s-mcclain

A related question: should the same deny-list apply to broadcasting group messages? @andy31415

bzbarsky-apple avatar Aug 08 '22 18:08 bzbarsky-apple

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Feb 04 '23 22:02 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Aug 07 '23 03:08 stale[bot]

We have some support for this by defining how interfaces are iterated upon in AddressPolicy.h where listen endpoints and valid ip addresses for endpoints are defined. We have a libnl implementation that is slightly better than the default (it will ignore temporary IPs or interfaces unable to broadcast).

We could expand on that support to allow platforms to override additional things.

Could we have a list of useful things to override? I think:

  • what we listen on (seems already done?)
  • where to broadcast queries (need explanation on why this is different from where to listen on)
  • ip address priority sorting (? just a guess .. we had several changes on ip prioritization ... this may not be minmdns specific and is more on the client than server side)
  • other?

andy31415 avatar Aug 09 '23 13:08 andy31415