Tue 20 Sep 2016 01:47:03 PM UTC, original submission:
As my project now makes use of both IGMP and MLD, I discovered the following oddity:
The lwIP IGMP implementation puts the "All Systems" group in its global multicast group list, but does some special casing in the code to avoid actually sending out reports for it.
The MLD implementation, on the other hand, does not put the "All Nodes" group in its group list, and therefore does not need the special casing dance either. However, this also means that netif implementations need to explicitly set up the MAC filter to allow incoming "All Nodes" multicast traffic, in addition to handling the MAC filter callback.
Should something be done about this? Personally I lean towards making IGMP behave like MLD already does. It would avoid wasting a memory pool slot for a constant entry, and would allow the code to be simplified by getting rid of the special casing. On the other hand, making that kind of change could silently break existing code.
However, until recently the MAC filter callbacks were rather awkward to implement anyway. I have a feeling that most netif implementations probably don't bother with the filter callbacks and simply let all incoming multicast packets pass. :)
In that light, it might make sense to merge the two filter callbacks for IGMP and MLD into a single mac_filter_update() callback, without the "action" and "group" parameters. Handlers would then be required to iterate the group lists by themselves. But as I've outlined in #49125, doing so is the natural/easiest way to go about this anyway.
An API change like that would break things at compile time, thereby avoiding the problem of failing silently.
|